Código del ejercicio: "calculadora con msgbox"
Dim n1, n2 As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Focus()
n1 = TextBox1.Text
n2 = TextBox2.Text
Label3.Text = n1 + n2
MsgBox("EL RESULTADO DE LA SUMA ES" & " " & Label3.Text, MsgBoxStyle.Information)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
n1 = TextBox1.Text
n2 = TextBox2.Text
Label3.Text = n1 - n2
MsgBox("EL RESULTADO DE LA RESTA ES" & " " & Label3.Text, MsgBoxStyle.Information)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
n1 = TextBox1.Text
n2 = TextBox2.Text
Label3.Text = n1 * n2
MsgBox("EL RESULTADO DE LA MULTIPLICACION ES" & " " & Label3.Text, MsgBoxStyle.Information)
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
n1 = TextBox1.Text
n2 = TextBox2.Text
Label3.Text = n1 / n2
MsgBox("EL RESULTADO DE LA DIVISION ES" & " " & Label3.Text, MsgBoxStyle.Information)
End Sub
End Class