B
Brad
I have several labels and textboxes that are drawn to a tab page based on
certain criteria so these labels and textboxes can be drawn at different
points on the tab page. I set the label and textbox names in the drawing
procedure. Now what I need to do is to get the control's information on a
mouse down.
Here is what I have:
////
Private Sub tcGuard_MouseDown(ByVal sender as Object, ByVal e as
System.Windows.Forms.MouseEventArgs) Handles tcGuard.Mousedown 'tcGuard is
a tab control
Dim mouseLocale as new point(e.X, e.Y)
dim tName as String
dim cntrl as New Control
cntrl = tcGuard.GetChildAtPoint(mouseLocale)
tname = cntrl.Name
End Sub
\\\\
Here is the error message I get: Object reference not set to an instance of
an object.
All I need to do at this juncture is get the name of the label or textbox
that the mouse clicked on.
If I am doing this wrong, please let me know and thanks for any help you can
give.
Brad
certain criteria so these labels and textboxes can be drawn at different
points on the tab page. I set the label and textbox names in the drawing
procedure. Now what I need to do is to get the control's information on a
mouse down.
Here is what I have:
////
Private Sub tcGuard_MouseDown(ByVal sender as Object, ByVal e as
System.Windows.Forms.MouseEventArgs) Handles tcGuard.Mousedown 'tcGuard is
a tab control
Dim mouseLocale as new point(e.X, e.Y)
dim tName as String
dim cntrl as New Control
cntrl = tcGuard.GetChildAtPoint(mouseLocale)
tname = cntrl.Name
End Sub
\\\\
Here is the error message I get: Object reference not set to an instance of
an object.
All I need to do at this juncture is get the name of the label or textbox
that the mouse clicked on.
If I am doing this wrong, please let me know and thanks for any help you can
give.
Brad