Hi,
I have a form in VB with many (over 100 - fields, labels, the form itself etc...) items on. I wondered if there was a way of refering to all the items on the form without having to list them all individually in the Handles keyword, which is extremely long winded! I want to carry out the same action wherever the user clicks on the form. At present I have the following code:
Private Sub myform_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtX.Click, _
txtY.Click, txtOS.Click, GroupBox1.Click, opb10.Click, opb100.Click, opb1000.Click, _
Label1.Click, Label2.Click, Label3.Click, Me.Click etc, etc.............
Any help much appreciated!
Simon
I have a form in VB with many (over 100 - fields, labels, the form itself etc...) items on. I wondered if there was a way of refering to all the items on the form without having to list them all individually in the Handles keyword, which is extremely long winded! I want to carry out the same action wherever the user clicks on the form. At present I have the following code:
Private Sub myform_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtX.Click, _
txtY.Click, txtOS.Click, GroupBox1.Click, opb10.Click, opb100.Click, opb1000.Click, _
Label1.Click, Label2.Click, Label3.Click, Me.Click etc, etc.............
Any help much appreciated!
Simon