|
-
Dec 10th, 2006, 07:26 PM
#14
Re: [2005] Hide control subcontrols
You open your UserControl in the designer, select each control and change it's Modifiers property to Private.
Note that the default access level in VB is Friend, not Public as I said previously. This is aprt of VB's effort to be easier to use for beginners because it means that you can set properties of the controls directly instead of having to declare extra properties in the UserControl. That leads to bad programming habits so all controls should be declared Private, as is the default in C#.
You will also want to change the access level of all controls, which is a very easy operation. Select your UserControl in the designer, press Ctrl+A (the standard "Select All" shortcut) to select every control and component, go to the Properties window, right click the Modifiers property and select "Reset". Done.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|