四則運算2
四則運算2
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 |
這個論壇的權限:
您 無法 在這個版面回復文章