Universidad Tecnológica De Panamá
Centro Regional de Veraguas
Facultad De Ingeniería civil
Asignatura: Programación
Taller # 2
Profesor:
Milka de Escobar
Estudiantes:
José Hernández
Javier Quintero
I Semestre 2019
Problema # 1
Public Class Form1
Private Sub cmdcuadrado_Click(sender As Object, e As EventArgs) Handles
cmdcuadrado.Click
Dim h, d As Integer
h = Val(Txtaltura.Text)
d = Val(txtRÓL.Text)
txtarea.Text = d ^ 2 / 2
txtvolumen.Text = 4 * h
PCuadrado.Visible = True
Prectangulo.Visible = False
Ppara.Visible = False
If Not IsNumeric(Txtaltura) Then
MsgBox(" valor errado")
End If
End Sub
Private Sub cmdrectangulo_Click(sender As Object, e As EventArgs) Handles
cmdrectangulo.Click
Dim h, D As Integer
h = Val(Txtaltura.Text)
D = Val(txtRÓL.Text)
txtarea.Text = D * h
txtvolumen.Text = 2 ^ D + 2 ^ h
Pcuadrado.Visible = False
Prectangulo.Visible = True
Ppara.Visible = False
If Not IsNumeric(Txtaltura) Then
MsgBox(" valor errado")
End If
End Sub
Private Sub cmdparale_Click(sender As Object, e As EventArgs) Handles
cmdparale.Click
Dim h, d As Integer
h = Val(Txtaltura.Text)
d = Val(txtRÓL.Text)
txtarea.Text = d * h
txtvolumen.Text = 2 ^ d + 2 ^ h
Pcuadrado.Visible = False
Prectangulo.Visible = False
Ppara.Visible = True
If Not IsNumeric(Txtaltura) Then
MsgBox(" valor errado")
End If
End Sub
End Class