How to choose the first form to be displayed?

1

When I run my project, fmPrincipal is always opened, however, I decided to create a fmLogin to be displayed first and the user to log in.

How do I configure fmLogin to be displayed first?

    
asked by anonymous 16.04.2017 / 17:25

1 answer

7

In your Main() method, call Application.Run(new fmLogin()); , passing as a parameter a new instance of fmLogin .

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

So, the application will start with fmlogin() .

    
16.04.2017 / 17:47