me.close() stops application running

ramyar

Newcomer
Joined
Oct 16, 2002
Messages
5
Hi,

When I use me.close() . It stops the running application, instead of closing the form.

frmMenu.Show()
Me.Close()

The above code does not display the frmMenu Form, instead it closes the application when the Me.Close() is executed

Thanks
 
One of the overloads of the Application.Run method takes no parameters, and creates a message loop not tied to any form. You should create a sub main, and show your first form before calling Application.Run(). You'll need to call Application.Exit() to shut down the message pump manually though.
 
Back
Top