Click here to Skip to main content
13,097,192 members (57,393 online)
Rate this:
Please Sign up or sign in to vote.
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 18-Jul-11 2:47am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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)
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...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Maybe this article can help you. Also look at my comment to this article: Workaround for flicker/flashing when programmatically activating MDI child forms[^]
szorik 18-Jul-11 10:28am
thanks :-)
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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).


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


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 18 Jul 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100