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

四則運算2

向下

四則運算2 Empty 四則運算2

發表  stty0910 周三 9月 08, 2010 4:27 pm

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 RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
c = A + B
TextBox3.Text = c
End Sub

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

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

Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
c = A / B
TextBox3.Text = c
End Sub
End Class

stty0910
終極管理員
終極管理員

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

https://bear.666forum.com

回頂端 向下

回頂端


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