Windows Forms MainMenu问题 [英] Windows Forms MainMenu question

查看:71
本文介绍了Windows Forms MainMenu问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我决定在我的主表单中使用MainMenu。我有一个菜单项

Open Form。单击此项目时,我想要newform.frm。在主窗体的菜单下方打开
。如何才能做到这一点?我正在使用VB.Net。


感谢您的回复。


Yoshi

Hi,
I have decided to use a MainMenu in my main form. I have a menu item
"Open Form". When this item is clicked I want the "newform.frm" to open just
below the menu in the main form. How can this be done? I am using VB.Net.

Thanks for any replies.

Yoshi

推荐答案

Yoshimitsy,


只需看看您的OpenForm在主表单上的位置。 (左边很容易就是

左边的菜单)。


比把它添加到表格的顶部和左边并设置在你面前打开

你的新形式的顶部和左边。


别忘了在WindowsDefaultLocation之前设置为手动。


我希望这会有所帮助,


Cor
Yoshimitsy,

Just see where your OpenForm is on your main form. (The left is easy that is
the Left of that menu).

Than add that to the Top and the Left of your form and set before you open
your new form the Top and the Left to that.

Don''t forget to set before the WindowsDefaultLocation to manual.

I hope this helps,

Cor


Hi Cor,

我在主表单上的标题和菜单栏下面打开一个表格(或者可能是同样的需要)只是

。我还必须通过添加到表单加载事件来获取这些条形图大小的

帐户

me.Topp = _

SystemInformation。 CaptionHeight +

SystemInformation.MenuHeight +

SystemInformation.Border3dSize.Height


似乎有效。你能否证实这是正确的做法?


TIA,

John


周一, 2005年5月23日10:41:52 +0200,Cor Ligthert

< no ************ @ planet.nl>写道:
Hi Cor,
I had a similar (or maybe it is the same need) to open a form just
below the title and menu bars on my main form. I had to also take into
account the size of these bars by adding to the form load event
me.Topp = _
SystemInformation.CaptionHeight +
SystemInformation.MenuHeight +
SystemInformation.Border3dSize.Height

It seemed to work. Can you confirm this is the correct way to do it?

TIA,
John

On Mon, 23 May 2005 10:41:52 +0200, "Cor Ligthert"
<no************@planet.nl> wrote:
Yoshimitsy,

只需看看OpenForm在主窗体上的位置。 (左边很简单,就是那个菜单的左边)。

然后将其添加到表单的顶部和左侧并在打开之前设置
新表单顶部和左侧。

不要忘记在WindowsDefaultLocation之前设置为手动。

我希望这有帮助,

Cor
Yoshimitsy,

Just see where your OpenForm is on your main form. (The left is easy that is
the Left of that menu).

Than add that to the Top and the Left of your form and set before you open
your new form the Top and the Left to that.

Don''t forget to set before the WindowsDefaultLocation to manual.

I hope this helps,

Cor






您好Cor,

我有类似的(或者可能是同样的需要)打开在我的主表单上的标题和菜单栏下面只有一个表单

。我还必须通过添加到表单加载事件来获取这些条形图大小的

帐户

me.Topp = _

SystemInformation。 CaptionHeight +

SystemInformation.MenuHeight +

SystemInformation.Border3dSize.Height


似乎有效。你能否证实这是正确的做法?


TIA,

John


周一, 2005年5月23日10:41:52 +0200,Cor Ligthert

< no ************ @ planet.nl>写道:
Hi Cor,
I had a similar (or maybe it is the same need) to open a form just
below the title and menu bars on my main form. I had to also take into
account the size of these bars by adding to the form load event
me.Topp = _
SystemInformation.CaptionHeight +
SystemInformation.MenuHeight +
SystemInformation.Border3dSize.Height

It seemed to work. Can you confirm this is the correct way to do it?

TIA,
John

On Mon, 23 May 2005 10:41:52 +0200, "Cor Ligthert"
<no************@planet.nl> wrote:
Yoshimitsy,

只需看看OpenForm在主窗体上的位置。 (左边很简单,就是那个菜单的左边)。

然后将其添加到表单的顶部和左侧并在打开之前设置
新表单顶部和左侧。

不要忘记在WindowsDefaultLocation之前设置为手动。

我希望这有帮助,

Cor
Yoshimitsy,

Just see where your OpenForm is on your main form. (The left is easy that is
the Left of that menu).

Than add that to the Top and the Left of your form and set before you open
your new form the Top and the Left to that.

Don''t forget to set before the WindowsDefaultLocation to manual.

I hope this helps,

Cor






这篇关于Windows Forms MainMenu问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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