Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • Leaders
Posted

You need to invoke the frmBlah.ShowDialog()

This will cause the form to run modally and execution will stop at the calling routine. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

  • *Experts*
Posted

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.

:)

  • *Experts*
Posted

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.

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...