Click here to Skip to main content
16,017,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have a project using an MDI form which is set to maximized state. The following properties are set on the MDI form:
FormBorderStyle = Fixed3D

Minimize Box = false;

Maximize Box = false;

IsMDIcontainer = true;

Now, I have two problems, but only when I run the application on a Windows Vista PC, on an XP PC it works fine. The first problem is that the menu bar which is docked at the bottom is hidden under the Windows task bar, thus you have to switch auto-hide on the Windows task bar to enable you to activate the application menus. The other is that the MDI form maximizes but you can still drag it around. I need it to be fixed and not movable. As stated above, if I run the application under Windows XP, the MDI form is fixed and not moveable and the menu bar at the bottom is visible.

Why is this happening under Vista? I haven't tried the application under Windows 7.

Any help would be most appreciated.

Thanks


Andy
Posted
Updated 1-Oct-10 11:30am
v2

How are you opening the MDI form? Are you actually having the form open with WindowState = FormWindowState.Maximized or are you sizing the form to fit the screen? If the later, then your form is set to FormWindowState.Normal and just very large; that would explain both the problems you described.
 
Share this answer
 
I'm opening the form using WindowState = FormWindowState.Maximized and letting windows handle sizing the form to the maximum screen area.

I have also tried FormBorderStyle = None, this gets over the problem of the Windows task bar covering the lower menu bar, but ideally I want to have an MDI that with a control box to give a Windows look and feel. Setting the FormBorderStyle to none, does not resolve the issue of being able to drag the MDI around.
 
Share this answer
 
Just solved the issue of the maximized form r.e. the menu bar being hidden. If I set the MaximizeBox to true initially then on the load event set it to false the the MDI is then correctly sized. However, the form is still movable, I guess this is because now Windows thinks that the Window is not a required to be in a maximized state.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900