Srinivas Miriyala's Blog


Friday, January 29, 2010

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: , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home