Hi,
i have manage to add up the points from different checkboxes but load in form. but how do i make everything to work in tab instead of working in form?
below is the codes but works in form.
Public Class Trial
Private GCS_Value As Integer = 0
Private Sub Trial_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lblGCSTotal.Text = CStr(GCS_Value)
End Sub
Private Sub cbxEyes4_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
cbxEyes1.Checked = False
cbxEyes2.Checked = False
cbxEyes3.Checked = False
cbxEyes4.Checked = True
update_GCSTotal()
End Sub
Private Sub cbxEyes3_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
.
.
.
.
.
.
.
.
End Sub
Sub update_GCSTotal()
GCS_Value = 0
Dim oCtrl As Control
For Each oCtrl In tblEyes.Controls
Try
If CType(oCtrl, CheckBox).Name.Contains("Eyes") And CType(oCtrl, CheckBox).Checked Then
GCS_Value += CInt(oCtrl.Text)
End If
Catch ex As Exception
End Try
Next
For Each oCtrl In tblVerbal.Controls
Try
If CType(oCtrl, CheckBox).Name.Contains("Verbal") And CType(oCtrl, CheckBox).Checked Then
GCS_Value += CInt(oCtrl.Text)
End If
Catch ex As Exception
End Try
Next
For Each oCtrl In tblMotor.Controls
Try
If CType(oCtrl, CheckBox).Name.Contains("Motor") And CType(oCtrl, CheckBox).Checked Then
GCS_Value += CInt(oCtrl.Text)
End If
Catch ex As Exception
End Try
Next
lblGCSTotal.Text = CStr(GCS_Value)
End Sub
End Class
Thank You
Best Regards
Dawn.Lee