Control access

  • Thread starter Thread starter OpticTygre
  • Start date Start date
O

OpticTygre

Is it possible to access a control on a User Control from a module via
directcast, or some other method? If so, how?

-Jason
 
How do you mean? Could you provide a sample?

Also, a little more information for you: My main form has a panel which
loads different user controls (mini forms, if you will) with controls on
them. Basically, I want to try and access a statusbar control on the
usercontrol from either the main form or a module. If the usercontrol
that's loaded isn't the right one, I'll just catch that in an exception.
Thanks, Sam.
 
* "OpticTygre said:
Is it possible to access a control on a User Control from a module via
directcast, or some other method? If so, how?

Set the control's 'Modifiers' property to 'Public', then use code like
this:

\\\
Public Sub Goo(ByVal Form As SimpleForm)
Form.UserControl1.Button1.Enabled = False
End Sub
///
 
Back
Top