tipos de triángulo de acuerdo al tamaño de cada uno de sus lados Visual basic
-
Upload
jhoan-manuel -
Category
Education
-
view
26 -
download
2
description
Transcript of tipos de triángulo de acuerdo al tamaño de cada uno de sus lados Visual basic
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