This Visual Basic code defines a form with three text boxes and two radio buttons. When the first button is clicked, it performs either addition or subtraction on the values in the first two text boxes depending on which radio button is checked and displays the result in the third text box. The second button hides the form when clicked.
This Visual Basic code defines a form with three text boxes and two radio buttons. When the first button is clicked, it performs either addition or subtraction on the values in the first two text boxes depending on which radio button is checked and displays the result in the third text box. The second button hides the form when clicked.
This Visual Basic code defines a form with three text boxes and two radio buttons. When the first button is clicked, it performs either addition or subtraction on the values in the first two text boxes depending on which radio button is checked and displays the result in the third text box. The second button hides the form when clicked.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox3.Enabled = False
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click Dim A As Integer = TextBox1.Text Dim s As Integer = TextBox2.Text If RadioButton1.Checked Then TextBox3.Text = A + s ElseIf RadioButton2.Checked Then TextBox3.Text = A - s
End If End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles