1.
Private Sub txtEA_Click(sender As Object, e As EventArgs) Handles
calcular.Click
Dim AN, edad, AA As Single
AN = Val(txtAN.Text)
AA = Val(txtAA.Text)
edad = AA - AN
txtedad.Text = edad
End Sub
2. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
txtCE.Click
Dim che, he, ce As Double
che = Val(txtche.Text)
he = Val(txthe.Text)
ce = che * he
txtCE.Text = ce
End Sub
3. Private Sub txtgc_Click(sender As Object, e As EventArgs) Handles gc.Click
Dim kmr, ckm, ct As Double
kmr = Val(txtkmr.Text)
ckm = Val(txtckm.Text)
ct = kmr * ckm
txtct.Text = ct
End Sub
Private Sub txtclean_Click(sender As Object, e As EventArgs) Handles
txtclean.Click
txtkmr.Clear()
txtckm.Clear()
txtct.Clear()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End
End Sub
4. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim td, cmin, cll As Single
td = Val(txttd.Text)
cmin = Val(txtcmin.Text)
cll = td * cmin
txtcll.Text = cll
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
txttd.Clear()
txtcmin.Clear()
txtcll.Clear()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
End
End Sub
5. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim pa, pd, pf As Single
pa = Val(txtpa.Text)
pd = pa - (pa * 0.2)
txtpd.Text = pd
pf = pa - (pa * 0.2) + (pa * 0.15)
txtpf.Text = pf
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
txtpa.Clear()
txtpd.Clear()
txtpf.Clear()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub
6. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim n1, n2, n3, p As Single
n1 = Val(txtn1.Text)
n2 = Val(txtn2.Text)
n3 = Val(txtn3.Text)
p = n1 * 0.25 + n2 * 0.25 + n3 * 0.5
txtp.Text = p
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
txtn1.Clear()
txtn2.Clear()
txtn3.Clear()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub
8. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim dh, pnh, pf As Single
dh = Val(txtdh.Text)
pnh = Val(txtpnh.Text)
pf = dh * pnh
txtpf.Text = pf
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
txtdh.Clear()
txtpnh.Clear()
txtpf.Clear()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub