如何运行固化剂窗口形式 [英] how to run cureent window form

查看:110
本文介绍了如何运行固化剂窗口形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有两种形式(Form1和Form2).我只想运行form2.请回复

hi all,

i''ve two forms(Form1 & Form2). i want to run just form2 only.please reply

推荐答案

拉维,

从Program.cs调用窗体时运行窗体(如果使用C#,则表示启动窗体)

Hi ravi,

A Form is run when it''s called from Program.cs (if using C#, if you mean the startup form)

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form2());
        }



您可以右键单击项目"->属性"->启动"表单->"Form2"(C#和VB都可以使用这种方式)

问候



You can right click on the Project->Property->Startup form->Form2 (both C# & VB can use this way)

Regards


这篇关于如何运行固化剂窗口形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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