Shutdown fails when app is running

N

Nick Ma

I'm having problems getting windows to close my app when the user shuts down
or logs off.

All I have in my project is a module and a form.

The module contains the following code:

Module modMain

Sub Main()

Dim frm As New Form1

frm.ShowDialog()

End Sub

End Module

The form contains no controls or code (other than auto generated stuff).

The start-up object is set to Sub Main.

When I try to log off or shutdown, the app closes but there is no log off or
shut down!

Any ideas, - this is driving me mad!

Regards

Nick
 
H

Herfried K. Wagner [MVP]

* "Nick Ma said:
I'm having problems getting windows to close my app when the user shuts down
or logs off.

All I have in my project is a module and a form.

The module contains the following code:

Module modMain

Sub Main()

Dim frm As New Form1

frm.ShowDialog()

Use 'Application.Run(New Form1())' instead of the code above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top