Public Class Form1
Private Sub btn_show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_show.Click
Dim sq_base1, sq_base2, sq_high, sq_area As Single
sq_base1 = txt_base1.Text
sq_base2 = txt_base2.Text
sq_high = txt_high.Text
sq_area = 0.5 * (sq_base1 + sq_base2) * sq_high
lbl_area.Text = sq_area
End Sub
Private Sub btn_clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_clear.Click
txt_base1.Text = " "
txt_base2.Text = " "
txt_high.Text = " "
lbl_area.Text = " "
End Sub
Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click
End
End Sub
End Class
ความคิดเห็น