When I create a WinForms app in C#, the output type is Windows Application and I get a program.cs with a static void Main() which I ca
If your application has only one form you may simply start typing Sub New() and Visual Studio will autogenerate this method stub which executes first. No project setting changes required.
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
'==> Put your pre-execution steps here.
End Sub