joesmow
asked on
Can 2 MDIChild forms be opened without effecting each other.
I am trying to have to MDIChild forms open at the same time without effecting the Windowstate of the other. One needs to stay maximized while the other is opened in a Normal state. Can this be done? If so, how?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
joesmow, the simple answer is no, the complex answer is maybe.
No: the MDI rules are that if any window is maximized, you effectively maximize any non-minimized windows at the same time, i.e. only one window can be maximized at a time in the MDI parent.
Maybe: PeteD's code would work to give you a simulation of this, however the SetParent call does not truly make the window into an MDIChild so whilst it will to some extent appear to be a child window you would have to add additional checking such as the window position within the MDI form to display/turn off scroll bars etc as these will not necessarily work properly.
I don't understand your specific reasons for wanting this, generally speaking I only use this kind of thing when displaying a modal form as a dialog or warning etc. Then I make this form a non-MDIChild and centre it over the MDI form. I generally prefer to stick within the MDI framework and modify my design rather than have to handle pseudo-MDIChildren in this way.
No: the MDI rules are that if any window is maximized, you effectively maximize any non-minimized windows at the same time, i.e. only one window can be maximized at a time in the MDI parent.
Maybe: PeteD's code would work to give you a simulation of this, however the SetParent call does not truly make the window into an MDIChild so whilst it will to some extent appear to be a child window you would have to add additional checking such as the window position within the MDI form to display/turn off scroll bars etc as these will not necessarily work properly.
I don't understand your specific reasons for wanting this, generally speaking I only use this kind of thing when displaying a modal form as a dialog or warning etc. Then I make this form a non-MDIChild and centre it over the MDI form. I generally prefer to stick within the MDI framework and modify my design rather than have to handle pseudo-MDIChildren in this way.
But U can make it as if it is maximized
(width & Height of MDI )
Waiting 4 Experts