如何制作默认的起始表格 [英] How to make a default starting form
本文介绍了如何制作默认的起始表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!我都创建了两个Windows Forms Form1和Form2,但是它想将form2作为默认的起始表单运行,我该怎么做?
Hi! all i have created two Windows Forms Form1 and Form2, but it want to run form2 as my default starting form how can i do that?
推荐答案
创建C#时默认情况下,将创建Program.cs文件的项目.
在此文件中,您可以看到此代码.
When you create a C# project by default Program.cs file will create.
In this file you can see this code.
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
如果要将启动表单从Form1更改为Form2,则只需更改第三行.
If you want to change the start up form from Form1 to Form2 then just change the third line.
Application.Run(new Form2());
已阅读此内容
更改启动表单 [ ^ ]
Have a read of this
Change Startup form[^]
这篇关于如何制作默认的起始表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文