Link to home
Start Free TrialLog in
Avatar of tpiazza
tpiazza

asked on

load multiple forms into main form

is there a way with a panel or something to load forms into my main form

looking for a way to build individual forms and then load them into my main form when a menu option is selected
Avatar of mydasx
mydasx

like a web usercontrol for asp.net but in winforms?  if you really want to get crazy w/ it, build custom controls homey.  then do  a visible invisible call.

However, i think the right answer is somewhat different.  Look at every major windows application you have ever used.  Did they implement window in window... no not really.  The windows application model is a dialog box model.  Where an application when needing further information will open a dialog and get its special data that way.  think of print preview, or save file etc.  these are complicated little buggers that get their own window who has control of the application only when he is needed.

mydasx
Avatar of tpiazza

ASKER

so instead of forms make them usercontrols?
right.  but, again i'd suggest, changing the model all together...  its like your trying to do web programming in the windows arena.  which where i'm from is a big no no...  but where youre from it may not be, so yes goto a usercontrol model
Avatar of tpiazza

ASKER

well im building an application with about 18 different forms -- want it to be seamless when they click on something-- all the forms are completely different

dont want to have to turn lots of controls on and off when they click on something -- any suggestions besides a usercontrol

also

how do i add the control at runtime?
personally, i use visible invisble and put them all on the form w/ a default setting.  Then create a method that toggles.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this:

Q_21820327.html