close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
VB簡易計算機缺減乘除!
Jul 15th 2013, 14:08

我已經寫出1~0的數字鍵,清除(C),負號,等於
但是-*/都不動耶?
這是我的程式碼:

Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
TextBox1.Text = TextBox1.Text & "+"
End Sub

Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
TextBox1.Text = TextBox1.Text & "-"
End Sub

Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
TextBox1.Text = TextBox1.Text & "*"
End Sub

Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
TextBox1.Text = TextBox1.Text & "/"
End Sub

Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
Dim myArray() As String = Split(TextBox1.Text, "+")
Dim Total As Single

Total = 0

For i = 0 To UBound(myArray)
Total = Total + Val(myArray(i))
Next

TextBox1.Text = Total
End Sub

這樣為什麼減乘除會沒辦法用?

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 nbv2eybn7a7ye 的頭像
    nbv2eybn7a7ye

    進擊的巨人14, 進擊的巨人線上看, 進擊的巨人漫畫, 進擊的巨人遊戲, 進擊的巨人 動畫, 進擊的巨人 線上漫畫, 進擊的巨人14線上看, 進擊的巨人13, 進擊的巨人 h, 進擊的巨人op

    nbv2eybn7a7ye 發表在 痞客邦 留言(0) 人氣()