Bloodstein Posted July 8, 2003 Posted July 8, 2003 I've got this module with a Sub Main() Method. In that, i'm 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 that's 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? Quote
Leaders Iceplug Posted July 8, 2003 Leaders Posted July 8, 2003 You need to invoke the frmBlah.ShowDialog() This will cause the form to run modally and execution will stop at the calling routine. :) Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
*Experts* mutant Posted July 8, 2003 *Experts* Posted July 8, 2003 Or :), if you want to run it like a normal application use this in your Sub Main: Application.Run(New Form1) 'or whatever your form is called This will start the message loop for your application. :) Quote
*Experts* DiverDan Posted July 8, 2003 *Experts* Posted July 8, 2003 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. Don't know your exact problem, but I hope this'll help. Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.