在WinForm应用程序的开发设计中,一般会通过多窗体协调一致的处理具体业务流程。这种应用必须由程序员决定那个WinForm的窗体第一个被触发执行,在Windows Forms开发程序设计中由位于根目录下的Program.cs文件决定。展开Program.cs文件,按照下面代码即可决定那个WinForm的表单第一个被触发执行。

using System;

using System.Collections.Generic;

using System.Windows.Forms;

namespace WindowsApplication1

{   

     staticclassProgram   

    {        ///<summary>        /// 应用程序的主入口点。        ///</summary>        [STAThread]       

        staticvoid Main()       

    {           

        Application.EnableVisualStyles();           

        Application.SetCompatibleTextRenderingDefault(false);           

        Application.Run(newForm011());//此处黑体字部分决定那个窗体文件首先被执行。       

}

    }

}

相关文章:

  • 2021-11-23
  • 2021-10-28
  • 2021-07-22
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-14
  • 2021-05-21
  • 2021-08-15
  • 2022-12-23
相关资源
相似解决方案