在Vista下运行的最大化MDI表单 [英] Maximized MDI forms running under Vista

查看:77
本文介绍了在Vista下运行的最大化MDI表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个使用MDI表单的项目,该表单设置为最大化状态.在MDI表单上设置以下属性:

FormBorderStyle = Fixed3D

Minimize Box = false;

Maximize Box = false;

IsMDIcontainer = true;


现在,我有两个问题,但是只有当我在Windows Vista PC上运行应用程序时,才可以在XP PC上正常运行.第一个问题是停在底部的菜单栏在Windows任务栏下隐藏,因此您必须在Windows任务栏上切换自动隐藏才能激活应用程序菜单.另一个是MDI表单最大化,但是您仍然可以拖动它.我需要将它固定不动.如上所述,如果我在Windows XP下运行该应用程序,则MDI表单是固定的并且不可移动,并且底部的菜单栏可见.

为什么在Vista下会发生这种情况?我没有在Windows 7下尝试过该应用程序.

任何帮助将不胜感激.

谢谢


Andy

解决方案

您如何打开MDI表单?您实际上是使用WindowState = FormWindowState.Maximized打开表单还是正在调整表单大小以适合屏幕?如果是更高版本,则您的表单将设置为FormWindowState.Normal且非常大;这将解释您所描述的两个问题.
我也尝试过FormBorderStyle = None,这可以解决Windows任务栏覆盖下层菜单栏的问题,但是理想情况下,我希望具有一个带有控件框的MDI,以赋予Windows外观.将FormBorderStyle设置为none并不能解决能够拖动MDI的问题.


仅解决了最大化形式r.e的问题.菜单栏被隐藏.如果我最初将MaximizeBox设置为true,则在加载事件上将其设置为false,然后正确调整MDI的大小.但是,表单仍然是可移动的,我想这是因为现在Windows认为不要求Window处于最大化状态.


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

解决方案

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.


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.


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.


这篇关于在Vista下运行的最大化MDI表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆