Application startup form calling/opening twice, when running application with sub main.
Today I encountered an issue, when I am starting windows application using Sub Main and calling startup form using Application.Run. The startup form was loading twice if I run the application using Application.Run(new mainForm()).
After couple of hours debuging and brainstroming I found a solution to it. The solution is, replacing Application.Run(new mainForm()) statement to Application.Run(Globla.WindowsApplication1.mainForm()).
Note : windowsApplication1 is your Project name and mainForm is the startup form name.
Labels: Forms, Instance, Multiple, Single, Windows, Winforms