main() in module sub

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hi,

I have my start point set to the main() sub in a module.

In main() I then show my form using the show.dialog method.

Problem I am having is that when an error fires anywhere it the app it falls
back into the main(), and then goes on with code after the showdialog line,
which ends my app.

I know I should be managing my errors better, but I was wondering if the
showdialog is the best way
 
Use Application.Run(frm) instead of frm.ShowDialog(). For example:


Public Shared Sub Main()
Application.Run(New TestForm())
End Sub

Tom Dacon
 
Back
Top