要用就少在那機掰
Would you like to react to this message? Create an account in a few clicks or log in to continue.

4則運算

向下

4則運算 Empty 4則運算

發表  stty0910 周一 9月 06, 2010 10:10 am

Public Class Form1
Dim A, B As Single
Dim c As Double
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub

Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
c = A - B
TextBox3.Text = c
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
c = A + B
TextBox3.Text = c
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
c = A * B
TextBox3.Text = c
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
c = A / B
TextBox3.Text = c
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End
End Sub
End Class


點我下載

stty0910
終極管理員
終極管理員

文章數 : 68
注冊日期 : 2010-08-06
年齡 : 30
來自 : 地球某個角落

https://bear.666forum.com

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章