Click here to Skip to main content
12,508,630 members (57,244 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
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
szorik449
Rate this: bad
 
good
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.
  Permalink  
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)
   
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.
Rate this: bad
 
good
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[^]
  Permalink  
v2
Comments
szorik 18-Jul-11 10:28am
   
thanks :-)
Rate this: bad
 
good
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).

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
  Permalink  

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 | Mobile
Web02 | 2.8.160927.1 | Last Updated 18 Jul 2011
Copyright © CodeProject, 1999-2016
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