Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

was wondering if anyone can help, i've got an issue with using multiple forms inside my main form.

tried going through with the MDI application solution , didn't quiet helped, as the forms flicker(redrawn) each time they are enabled and it's a bit annoying.

building a user control out of each form is quiet a tedious work.

so if anyone had this kind of problem and could help, will be very gratefull...
Posted

MDI or control - that's your choice. Non-MDI Forms cannot be contained within other forms, so pick one! Sorry, but those is the breaks.
 
Share this answer
 
Comments
szorik 18-Jul-11 8:55am    
so if you do pick one of those, how do you disable the flicker of the form (without destroying the form object)
#realJSOP 18-Jul-11 11:47am    
google "winforms double buffering"
Dave Kreskowiak 18-Jul-11 14:43pm    
Yes, they can. Form inherits from Control and will work in any container that can handle Control. All you have to do is set the TopLevel property of the form instance to False, then add it to the Controls collection.
OriginalGriff 18-Jul-11 15:09pm    
Didn't know that - thanks. I'll try to remember to 5 you next time I see a post that'll take it...
szorik 19-Jul-11 6:08am    
yeah, saw that...
Thanks.
Maybe this article can help you. Also look at my comment to this article: Workaround for flicker/flashing when programmatically activating MDI child forms[^]
 
Share this answer
 
v2
Comments
szorik 18-Jul-11 10:28am    
thanks :-)
Do yourself a big favor, never use MDI! Don't torture yourself and repel your customers. What you wanted to be child control could be panels of instanced of TabPanels (highly recommended: create tab UI based on TabControl).

See:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^].

In my past answers:
MDIContainer giving error[^],
Question on using MDI windows in WPF[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900