Upload
jhoan-manuel
View
26
Download
2
Embed Size (px)
DESCRIPTION
Private Sub Command1_Click() If txtlado1.Text = "" And txtlado2.Text = "" And txtlado3.Text = "" Then strin = MsgBox("LOS CAMPOS ESTAN VACIOS", vbOKOnly, "Información") txtlado1.SetFocus Else lbltriangulo.Caption = " EQUILÁQTERO " imgquilatero.Visible = True imgescaleno.Visible = False imgisosceles.Visible = False End If If Val(txtlado1.Text) Val(txtlado2.Text) Val(txtlado3.Text) Then lbltriangulo.Caption = " ESCALENO " imgescaleno.Visible = True imgquilatero.Visible = False imgisosceles.Visible = False End If If (Val(txtlado1.Text) Val(txtlado2.Text) And (Val(txtlado2.Text) = Val(txtlado3.Text)) And (Val(txtlado3.Text) Val(txtlado1.Text))) Or (Val(txtlado1.Text) Val(txtlado2.Text) And (Val(txtlado2.Text) Val(txtlado3.Text)) And (Val(txtlado3.Text) = Val(txtlado1.Text))) Or (Val(txtlado1.Text) = Val(txtlado2.Text) And (Val(txtlado2.Text) Val(txtlado3.Text)) And (Val(txtlado3.Text) Val(txtlado1.Text))) Then lbltriangulo.Caption = " ISOCÉLES " imgisosceles.Visible = True imgquilatero.Visible = False imgescaleno.Visible = False End If txtlado1.SetFocus End Sub
Citation preview
Private Sub Command1_Click()
If txtlado1.Text = "" And txtlado2.Text = "" And txtlado3.Text = "" Then
strin = MsgBox("LOS CAMPOS ESTAN VACIOS", vbOKOnly, "Información")
txtlado1.SetFocus
Else
lbltriangulo.Caption = " EQUILÁQTERO "
imgquilatero.Visible = True
imgescaleno.Visible = False
imgisosceles.Visible = False
End If
If Val(txtlado1.Text) <> Val(txtlado2.Text) <> Val(txtlado3.Text) Then
lbltriangulo.Caption = " ESCALENO "
imgescaleno.Visible = True
imgquilatero.Visible = False
imgisosceles.Visible = False
End If
If (Val(txtlado1.Text) <> Val(txtlado2.Text) And (Val(txtlado2.Text) = Val(txtlado3.Text)) And (Val(txtlado3.Text) <> Val(txtlado1.Text))) Or (Val(txtlado1.Text) <> Val(txtlado2.Text) And (Val(txtlado2.Text) <> Val(txtlado3.Text)) And (Val(txtlado3.Text) = Val(txtlado1.Text))) Or (Val(txtlado1.Text) = Val(txtlado2.Text) And (Val(txtlado2.Text) <> Val(txtlado3.Text)) And (Val(txtlado3.Text) <> Val(txtlado1.Text))) Then
lbltriangulo.Caption = " ISOCÉLES "
imgisosceles.Visible = True
imgquilatero.Visible = False
imgescaleno.Visible = False
End If
txtlado1.SetFocus
End Sub