单击菜单栏以转到C#Windows应用程序中的下一页 [英] clicking menu strip to go the next page in C# windows application

查看:61
本文介绍了单击菜单栏以转到C#Windows应用程序中的下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个C#Windows基本应用程序页面,如果单击特定菜单,则菜单栏位于其中,然后应转到特定页面,但我无法编写代码可以对此有所帮助


谢谢与问候
Indrajit dasgupta

Hi All,
I have a C# windows base application page where Menu strip is there if I click the particular menu then it should go to specific page but I m not able to write the code can any help me for that


Thanks & regards
Indrajit dasgupta

推荐答案



您需要处理Menustrip的click事件,并且可以从那里打开一个表单.

有关更多详细信息,请阅读这些文章
MenuStrip类

创建MenuStrip

问候
AR
Hi,

You need to handle click event of Menustrip and you can open a form from there.

For more detail please read these articles
MenuStrip Class

Creating a MenuStrip

Regards
AR


let假定您要转到名为Form2的窗体,因此如果您想通过键入此代码来调用其他窗体

lets assume the Form you want to go to named Form2 so in the event you want to call the other form from type this code

Form2 f2 = new Form2();
f2.Show();







or

Form2 f2 = new Form2();
f2.ShowDialog();  // to use the DialogResult in your Form2







or

Form2 f2 = new Form2();
f2.ShowDialog(this); // to use the Dialog Result in your Form2 and make the first Form nonuseble till Form2 closed


好像您具有Web开发背景.我建议您在进一步尝试之前,先学习桌面UI开发的基础知识.

或者,如果您确实希望浏览器应用程序具有外观,则可以查看WPF/Xaml.
Looks like you have a web dev background. I would recommend that you learn the basics of desktop UI development before venturing further.

Alternatively you could look at WPF/Xaml if you really want the browser application look and feel.


这篇关于单击菜单栏以转到C#Windows应用程序中的下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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