meravkn
asked on
ZOrder and MDI child forms
Hi,
In my application I have an MDI form and 2 child forms with pictures. I'd like to have a few more forms that will effect the picture on the child forms (like colors, size etc.). I'd like to use the other form as regular- non-child forms, so that I can use MDIForm1.ActiveForm property, that will refer to ONLY one of the child forms. The problem is that even if I use ZOrder both for the parent MDI form (ZOrder 1) and the other regular forms (ZOrder 0), the MDI parent form covers the non-child forms.
How can I solve this problem? I want the non-child forms to be always on top of the MDI parent form, without being a child-form.
Thanks!
In my application I have an MDI form and 2 child forms with pictures. I'd like to have a few more forms that will effect the picture on the child forms (like colors, size etc.). I'd like to use the other form as regular- non-child forms, so that I can use MDIForm1.ActiveForm property, that will refer to ONLY one of the child forms. The problem is that even if I use ZOrder both for the parent MDI form (ZOrder 1) and the other regular forms (ZOrder 0), the MDI parent form covers the non-child forms.
How can I solve this problem? I want the non-child forms to be always on top of the MDI parent form, without being a child-form.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
This is for future references, from MSDN:
The Show method has another optional argument, owner, that can be used to specify a parent-child relationship for a form. You can pass the name of a form to this argument to make that form the owner of the new form.
To display a form as a child of another form
Use the Show method with both style and owner arguments.
For example:
' Display frmAbout as a modeless child of frmMain.
frmAbout.Show vbModeless, frmMain
Using the owner argument with the Show method ensures that the dialog box will be minimized when it?s parent is minimized, or unloaded should the parent form be closed.
Where in my case frmMain = MDIForm1
Thanks!