Why do child forms display behind controls on the main form?
Unfortunately, it is standard Windows Forms behavior that any controls placed directly on an MDI parent form are first in the Z-Order before any child forms and are always displayed in front of the forms at run time. That's why on the MM .NET Sample application's main form there is code that hides the main form image when a child form is launched and makes it visible when no forms are displayed.
If you want to do the same thing with controls on your application's main form, you can override your application's MainForm ShowDesktopImage() and HideDesktopImage() methods as described in the Help topic Adding an Image to the Main Application Window.
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 09/08/04
Comment or report problem with topic
