Public Class ตรวจ
Dim sum As Integer
Dim a34, a39, a44, a49, a50 As Integer
Private Sub ตรวจ_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub RadioButton7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles age50.CheckedChanged
End Sub
Private Sub ออกจากโปรแกรมToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ออกจากโปรแกรมToolStripMenuItem.Click
Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim man As Integer
If men.Checked = True Then
man = 2
End If
Dim girl As Integer
If female.Checked = True Then
girl = 0
End If
If age34.Checked = True Then
a34 = 0
End If
If age39.Checked = True Then
a39 = 0
End If
If age44.Checked = True Then
a44 = 0
End If
If age49.Checked = True Then
a49 = 1
End If
If age50.Checked = True Then
a50 = 2
End If
sum = a34 + a39 + a44 + a49 + a50 + man + girl
Label1.Text = sum
End Sub
Private Sub age34_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles age34.CheckedChanged
End Sub
Private Sub age39_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles age39.CheckedChanged
End Sub
Private Sub age44_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles age44.CheckedChanged
End Sub
Private Sub age49_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles age49.CheckedChanged
End Sub
Private Sub men_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles men.CheckedChanged
End Sub
Private Sub female_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles female.CheckedChanged