如何指定要首先运行的特定Windows窗体

编程入门 行业动态 更新时间:2024-10-24 20:12:57
本文介绍了如何指定要首先运行的特定Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有一个包含多种形式的项目.我想从那个项目运行一个特定的表单,这没有发生.来自同一项目的另一种形式首先会开始,我不想这样做. 我正在使用Visual Studio Ultimate. 2010.有人可以帮我吗plz

解决方案

转到项目"program.cs",并在行中更改表单名称,如下所示:

静态 class 程序 { // < summary> // 应用程序的主要入口点. // </summary> [STAThread] 静态 无效 Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault( false ); Application.Run(新 Form1()); // < --------在此处更改 } }

i have a project which consist of many forms. I want to run a particular form from a that project, which is not happening. An another form from the same project starts at first which i dont want to. I am using visual studio ultimate. 2010. Can any one help me plz

解决方案

Go to the projects "program.cs" and change the form name in the line like the following :

static class Program { // <summary> // The main entry point for the application. // </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); // <-------- change here } }

更多推荐

如何指定要首先运行的特定Windows窗体

本文发布于:2023-11-05 09:29:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1560470.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:窗体   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!