The document contains code for a form with text boxes to enter numbers, radio buttons to select an operation, and buttons to perform the calculation, clear values, and close the form. It defines variables to store the numbers and result, checks which radio button is selected to determine the operation, performs the calculation, and displays the result in a message box or label.
The document contains code for a form with text boxes to enter numbers, radio buttons to select an operation, and buttons to perform the calculation, clear values, and close the form. It defines variables to store the numbers and result, checks which radio button is selected to determine the operation, performs the calculation, and displays the result in a message box or label.
The document contains code for a form with text boxes to enter numbers, radio buttons to select an operation, and buttons to perform the calculation, clear values, and close the form. It defines variables to store the numbers and result, checks which radio button is selected to determine the operation, performs the calculation, and displays the result in a message box or label.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim n1, n2, n3 As Integer Dim result As Double n1 = TextBox1.Text n2 = TextBox2.Text n3 = TextBox3.Text If (Rad_suma.Checked = True) Then result = n1 + n2 + n2 ElseIf (Rad_resta.Checked = True) Then result = n1 - n2 - n3 ElseIf (Rad_multiplicar.Checked = True) Then result = n1 * n2 * n3 Else result = n1 / n2 / n3 End If
MsgBox("el resultado de la operacion es:" & result)
--Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click Dim n1, n2, n3 As Integer Dim result As Double n1 = TextBox1.Text n2 = TextBox2.Text n3 = TextBox3.Text If (Rad_suma.Checked = True) Then result = n1 + n2 + n2 ElseIf (Rad_resta.Checked = True) Then result = n1 - n2 - n3 ElseIf (Rad_multiplicar.Checked = True) Then result = n1 * n2 * n3 Else result = n1 / n2 / n3 End If
Label2.Text = Label2.Text & result & vbCrLf
--Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click Dispose()
--Private Sub Button2_Click(sender As Object, e As EventArgs) Handles