Sub Main

Bloodstein

Member
Joined
Jul 1, 2003
Messages
10
Ive got this module with a Sub Main() Method. In that, im making a call to show a form (frmBlah.Show()). Now, what happens is that, the form is shown but the program exits almost immediately. So basically, u get like a brief flash of the form and thats it.

I want the form to be shown and until the user exits the form, the form must remain visible and the program running. Is there anyway I can do this?
 
Or :), if you want to run it like a normal application use this in your Sub Main:
Code:
Application.Run(New Form1) or whatever your form is called
This will start the message loop for your application.
:)
 
Not knowing everything that makes your second form disappear, there might be a control on the first form that is being activated by the mouse which would cause the first form to be repainted over the second. Putting me.topmost = true in the second form will solve this problem.

Dont know your exact problem, but I hope thisll help.
 
Back
Top