What is the equivalent of Program.cs in VB.NET WinForms application?
I need to move my .CS app to VB.NET.
As I do not have forms in my WinForms project in Program.cs I do the following:
Application.Run(new MyForm(parm1, parm2);
How to move this code in VB.NET?
Thanks
By default, VB.NET applications use the mysterious Windows Application Framework which means that the build process adds an entry point for you which automatically runs whichever form you use as the main form. You can access these settings via Project Properties > Application > Windows application framework properties.
If you don’t want to use the framework, un-check the Enable application framework check box and then select that you want to use
Sub Mainas your Startup object. Then you can create a module with aPublic Sub Mainmethod which will be the entry point to the application, just like in Program.cs in C#.