You can use the Me.ActiveControl property, additionally if a control is withing another control you can call this property from the control. For Example if you have a SplitContainer which has another control in it you can do the following:
If Me.ActiveContainer Is SplitContainer1 Then
If SplitContainer1.ActiveControl Is MyControl1 Then
Do Something
No comments:
Post a Comment