Public Class Form3
Dim a, b, c As Integer
Function mayor(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer) AsInteger
Dim d As Integer = a
If b > d Then
d = b
End If
If c > d Then
d = c
End If
mayor = d
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
Dim d As Integer = mayor(a, b, c)
Label3.Text = d
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form4.Show()
End Sub
End Class

No hay comentarios:
Publicar un comentario