You are on page 1of 3

Calculando DISTANCIA VELOCIDAD

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim T, D, V, A As Double
A = Val(TextBox1.Text)
T = Val(TextBox2.Text)
D = 0.5 * A * T * T
V = A * T
TextBox3.Text = T
TextBox4.Text = D
TextBox5.Text = V

End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

End Sub

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


Button3.Click
Close()
End Sub
End Class
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim H, B1, B2, AREA As Double
H = Val(TextBox1.Text)
B1 = Val(TextBox2.Text)
B2 = Val(TextBox3.Text)
AREA = (B1 + B2) / 2 * H
TextBox4.Text = AREA
End Sub

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


Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox1.Focus()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Close()
End Sub

You might also like