You are on page 1of 2

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.

Click
If Val(TextBox1.Text) > Val(TextBox2.Text) And Val(TextBox2.Text) >
Val(TextBox3.Text) Then
Label5.Text = "Mayor"
Label6.Text = "Medio"
Label7.Text = "Menor"
End If
If Val(TextBox2.Text) > Val(TextBox3.Text) And Val(TextBox3.Text) >
Val(TextBox1.Text) Then
Label5.Text = "Menor"
Label6.Text = "Mayor"
Label7.Text = "Medio"
End If
If Val(TextBox3.Text) > Val(TextBox1.Text) And Val(TextBox1.Text) >
Val(TextBox2.Text) Then
Label5.Text = "Medio"
Label6.Text = "Menor"
Label7.Text = "Mayor"
End If
If Val(TextBox2.Text) > Val(TextBox1.Text) And Val(TextBox1.Text) >
Val(TextBox3.Text) Then
Label5.Text = "Medio"
Label6.Text = "Mayor"
Label7.Text = "Menor"
End If
If Val(TextBox1.Text) > Val(TextBox3.Text) And Val(TextBox3.Text) >
Val(TextBox2.Text) Then
Label5.Text = "Mayor"
Label6.Text = "Menor"
Label7.Text = "Medio"
End If
If Val(TextBox1.Text) < Val(TextBox3.Text) And Val(TextBox3.Text) >
Val(TextBox2.Text) Then
Label5.Text = "Menor"
Label6.Text = "Medio"
Label7.Text = "Mayor"
End If
If Val(TextBox1.Text) > Val(TextBox2.Text) And Val(TextBox2.Text) =
Val(TextBox3.Text) Then
Label5.Text = "Mayor"
Label6.Text = "Igual"
Label7.Text = "Igual"
End If
If Val(TextBox1.Text) = Val(TextBox2.Text) And Val(TextBox2.Text) =
Val(TextBox3.Text) Then
Label5.Text = "Igual"
Label6.Text = "Igual"
Label7.Text = "Igual"
End If
If Val(TextBox2.Text) > Val(TextBox3.Text) And Val(TextBox3.Text) =
Val(TextBox1.Text) Then
Label5.Text = "Igual"
Label6.Text = "Mayor"
Label7.Text = "Igual"
End If
If Val(TextBox3.Text) > Val(TextBox1.Text) And Val(TextBox1.Text) =
Val(TextBox2.Text) Then
Label5.Text = "Igual"
Label6.Text = "Igual"
Label7.Text = "Mayor"
Button2.Focus()
End If
If Val(TextBox1.Text) < Val(TextBox2.Text) And Val(TextBox2.Text) =
Val(TextBox3.Text) Then
Label5.Text = "Menor"
Label6.Text = "Igual"
Label7.Text = "Igual"
End If
If Val(TextBox2.Text) < Val(TextBox3.Text) And Val(TextBox3.Text) =
Val(TextBox1.Text) Then
Label5.Text = "Igual"
Label6.Text = "Menor"
Label7.Text = "Igual"
End If
If Val(TextBox3.Text) < Val(TextBox2.Text) And Val(TextBox2.Text) =
Val(TextBox1.Text) Then
Label5.Text = "Igual"
Label6.Text = "Igual"
Label7.Text = "Menor"
End If
Button2.Focus()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Label5.Text = ""
Label6.Text = ""
Label7.Text = ""
TextBox1.Focus()
End Sub
Private Sub TextBox2_TextChanged(sender As Object, e As KeyPressEventArgs)
Handles TextBox2.KeyPress
If Asc(e.KeyChar) = 13 Then
TextBox2.Focus()
End If
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As KeyPressEventArgs)


Handles TextBox1.KeyPress
If Asc(e.KeyChar) = 13 Then
TextBox3.Focus()
End If
End Sub

Private Sub TextBox3_TextChanged(sender As Object, e As KeyPressEventArgs)


Handles TextBox3.KeyPress
If Asc(e.KeyChar) = 13 Then
Button1.Focus()
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
End
End Sub

You might also like