如何在Windows应用程序.net中设置启动表单我是新开发人员,请尽快告诉我 [英] How to set start form in a Windows Application .net i am new developer please tell me soonly

查看:49
本文介绍了如何在Windows应用程序.net中设置启动表单我是新开发人员,请尽快告诉我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢进阶
......................
..............................
.....................

Thanks in advanced
......................
..............................
..............................

推荐答案

在您的解决方案中如果打开该文件,则应有一个名为Program.cs的文件.该文件中应包含以下文件.
In your solution you should have a file called Program.cs if you open it, it should have the following in it.
static void Main()
{
  Application.EnableVisualStyles();
  Application.SetCompatibleTextRenderingDefault(false);
  Application.Run(new Form1());
}


要更改作为启动表单打开的表单,请更改行Application.Run(new Form1());,在其中将Form1更改为要在应用程序启动时打开的表单的名称.
因此,如果我有一个名为Parent1的表单,并且希望在我的应用程序启动时将其打开,我将拥有该表单;


To change the form which opens as the start form change the line Application.Run(new Form1()); where you change Form1 to the name of the form you want to open on application start.
So if I have a form called Parent1 and I want to have it open when my application starts I would have;

static void Main()
{
  Application.EnableVisualStyles();
  Application.SetCompatibleTextRenderingDefault(false);
  Application.Run(new Parent1());
}


请将文件的其余部分保留下来.


Leave the rest of the file alone.


我建​​议您拿起一本不错的C#书,然后从那里开始.
I would suggest you pick up a good C# book and start from there.


如果您那么新,买一本书,并在www.google.com上添加书签.确切地告诉您如何执行此操作,但是您应该有一些资源.实际上,您应该在课程中并与老师交谈.如果您只是在自学,则需要花费更长的时间才能编写出任何有心人愿意付钱的代码.
If you''re so new, buy a book, and bookmark www.google.com. You''ve been told exactly how to do this, but you should have some resources. In fact, you should be in a course and be talking to teachers. If you''re just teaching yourself, it will take longer before you''re able to write code anyone in their right mind would pay for.


这篇关于如何在Windows应用程序.net中设置启动表单我是新开发人员,请尽快告诉我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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