Here are some frequently asked questions about Windows Forms and their answers.
Browse by Tags
All Tags » MDI (RSS)
-
|
You should not try listening to your MDI container Form's Paint event, instead listen to the Paint event of the MDIClient control that is a child of the mdi container form. This article provides you a detailed example: Painting in the MDI Client Area...
|
-
|
MDIContainer forms have an MDIClient child window and it is to this MDIClient window that MDI child forms are parented. The MDIClient's ControlAdded/ControlRemoved events will be fired whenever a child form is added or removed. You can subscribe to...
|
-
|
Here are two ways you can do this. 1. Within the parent MDI form, use code such as this: // ChildForm is type being created or shown ChildForm childForm = null; foreach ( Form f in MdiChildren ) if ( f is ChildForm ) { childForm = (ChildForm) f; break;...
|
-
|
It appears that this behavior is a bug that will be corrected in a future .NET release. You can control the size of your child form by adding a Layout event handler for it. Here is a code snippet that imposes the minimum size that you set in its properties...
|
-
|
In the .NET Framework 1.0, child forms do not get the Form.Activated event (only the parent MDI). To catch MDI children being activated, listen to the Enter/Leave events of that child Form or listen to the Form.MdiChildActivate event in the parent Form...
|
-
|
Here is how it can be done. This takes into account all docked controls (including menus) in the mdi parent form. [C#] private void FillActiveChildFormToClient() { Rectangle mdiClientArea = Rectangle.Empty; foreach ( Control c in Controls ) if (c is MdiClient...
|
-
|
The default behavior is to make the client container use the Control color from the Control panel. You can change this behavior by making the MDI Client container use the form's BackColor and Image. To do this, after the call to InitializeComponents...
|
-
|
This is one of the QuickStart Samples that ships with Visual Studion .NET. Contributed from George Shepherd's Windows Forms FAQ
|
-
|
I have an MDI application, but when I switch between MDIChild windows, there are always flickers. The newly active MDIChild window flashes its borders which is disturbing. If it matters, I always use Maximized MDI Child windows. How can I eliminate this...
|
-
|
Here is a simple, complete source for creating MDI child windows. To build, reference System, System.Drawing, and System.Windows.Forms. using System; using System.Windows.Forms; namespace Application1 { class Program { static void Main( string[] args...
|