Ahora vamos a hacer una calculadora simple de operaciones matemáticas. Abrimos un nuevo proyecto DHTML y dibujamos una tabla con etiquetas y cajas de texto y cinco botones. En tiempo de ejecución se ve como la imagen de la izquierda. Y la codificación es la siguiente:
Private Sub Command1_Click()
Text3.Text = Val(Text1) + Val(Text2)
End Sub
Private Sub Command2_Click()
Text3.Text = Val(Text1) - Val(Text2)
End Sub
Private Sub Command3_Click()
Text3.Text = Val(Text1) / Val(Text2)
End Sub
Private Sub Command4_Click()
Text3.Text = Val(Text1) * Val(Text2)
End Sub
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Hoy habia 59 visitantes (70 clics a subpáginas) ¡Aqui en esta página!