When I try to show a form, I have to use ShowDialog instead of Show. (This is causing problems later in my code.) When I use show, the form pops up for a second and then the program closes. (VB.Net 2003)
+1
A:
Use Application.Run()
after showing your form so the application can continue working.
Or use Application.Run(yourForm)
which will show your form and keep the application running until the yourForm
closes.
Pierre-Alain Vigeant
2009-11-21 02:51:52
After days of searching the web and finding answers that don't work,this works - and it's so simple! Thank you!
Min
2009-11-21 03:20:34
Be aware that if you call `Application.Run()`, you will have to explicitly stop the application by calling `Application.Exit()` when your form closes, like in the `Form_Closed` event.
Pierre-Alain Vigeant
2009-11-21 03:25:26