Dim a, b, hip, alan, cevre As Single
a = TextBox1.Text
b = TextBox2.Text
hip = (a * a + b * b)
TextBox3.Text = hip
alan = a * b / 2
cevre = a + b + hip
TextBox5.Text = cevre
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim a, alan, cevre As Single
a = TextBox6.Text
alan = a * a
cevre = 4 * a
TextBox7.Text = alan
TextBox8.Text = cevre
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim a, b, alan, cevre As Single
a = TextBox9.Text
b = TextBox10.Text
alan = a * b
cevre = 2 * (a + b)
TextBox11.Text = alan
TextBox12.Text = cevre
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim r, alan, cevre As Single
Const pi As Single = 3.14
r = TextBox13.Text
alan = pi * r * r
cevre = 2 * pi * r
TextBox14.Text = alan
TextBox15.Text = cevre
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim a, h, alan As Single
a = TextBox16.Text
h = TextBox17.Text
alan = a * h
TextBox18.Text = alan
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim a, b, h, alan As Single
a = TextBox19.Text
b = TextBox20.Text
h = TextBox21.Text
alan = (a + b) * h / 2
TextBox22.Text = alan
End Sub