ADO DOT NET
Centurion
- Joined
- Dec 20, 2006
- Messages
- 160
Visual Basic:
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
---
Visual Basic:
CheckBox1_CheckedChanged(Me, Nothin)
But if user manually click on the check box then sender.ToString will be: System.Windows.Forms.CheckBox, CheckState: 1/0
Now I want to do some thing if user clicked on the check box and do some thing if it was called on form load event.
I can do it this way:
In CheckBox1_CheckedChanged event I use sender.ToString and compare this string, to see how this event has been called!
But this does seem to be logical.
There should be a better way.
Last edited by a moderator: