Thursday, July 1, 2021

C# Winform Changing startup form




Inside the Program.cs file, chnage the form name in
Application.Run(new frmLogin()); to
Application.Run(new Register());

using System;
using System.Windows.Forms;

namespace WinFormsAppx1
{
    static class Program
    {
        /// 
        ///  The main entry point for the application.
        /// 
        [STAThread]
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmLogin());
        }
    }
}



Edited on 6th July 2023

No comments:

Post a Comment

Hot Topics