AdvancedHMI Software

General Category => Open Discussion => Topic started by: MrPike on October 04, 2020, 10:13:36 AM

Title: change which form opens first in VS2019
Post by: MrPike on October 04, 2020, 10:13:36 AM
Hey AHMI community, I have a general VS2019 question, how do I open a different Winform other than Form1 initially?  I have added a second form and want it to open first when the app is started.
 I have looked for a setting in the project properties but can't seem to find the setting.  Any help is appreciated, Thank you.   
Title: Re: change which form opens first in VS2019
Post by: Archie on October 04, 2020, 10:48:17 AM
- In Solution Explorer Right click the project
- Go to Application Tab
- Change Startup Form in drop down list
Title: Re: change which form opens first in VS2019
Post by: MrPike on October 04, 2020, 11:45:59 AM
Sorry to be so blind but I don't see an option for this.  This is the only application tab I can find
Title: Re: change which form opens first in VS2019
Post by: Archie on October 04, 2020, 12:17:03 PM
I assumed you were in VB, c# is different.

You should have a Program.cs file

Open that file and you will see:
Application.Run(New zzzzz)

zzzzz will be the name of the form to open .
Title: Re: change which form opens first in VS2019
Post by: MrPike on October 04, 2020, 01:26:05 PM
Viola!  Thanks Archie!