如何设置哪种形式首先出现
问题描述:
我是一名C#初学者,并且我已经熟悉Windows Forms App.我有2种表单,我试图了解如何将其中一种设置为运行应用程序时出现的第一种表单.
I'm a beginner c# programmer, and i'm getting familiar with the Windows Forms App. I have 2 forms and i'm trying to understand how to set one of them to be the first one that appears when i'm running the application.
有没有一种方法可以设置此设置,或者我必须按照它们出现的顺序来创建表单?
Is there a way to set this, or I have to create the forms by the order they appears?
答
在 Program.cs
中,您将看到以下代码行
In Program.cs
, you will see the following line of code
Application.Run(new Form1());
此行显示 Form1
.
您可以更改它以执行您想要的任何事情.
This line shows Form1
.
You can change it to do whatever you want.