Posted 19 years ago
by Actipro Software Support
- Cleveland, OH, USA
Just wanted to post this information since several users have asked about using Forms as child controls of tool and document windows.
UIStudio fully supports this although you need to make two property changes to the Form before adding it to a tool or document window.
1) Forms are not visible by default whereas Controls are. Be sure to set the Form.Visible property to true before adding the Form so that it is visible.
2) Set the Form.TopLevel property to false before adding the Form. Otherwise, the .NET framework will throw an exception.
If you do those two things, you'll be good to go!
In practice, we think it's easier to use UserControls instead of Forms for contained functionality since they provide the same code encapsulation features but don't require these extra steps.
UIStudio fully supports this although you need to make two property changes to the Form before adding it to a tool or document window.
1) Forms are not visible by default whereas Controls are. Be sure to set the Form.Visible property to true before adding the Form so that it is visible.
2) Set the Form.TopLevel property to false before adding the Form. Otherwise, the .NET framework will throw an exception.
If you do those two things, you'll be good to go!
In practice, we think it's easier to use UserControls instead of Forms for contained functionality since they provide the same code encapsulation features but don't require these extra steps.
Actipro Software Support