By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

main() in module sub

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Use Application.Run(frm) instead of frm.ShowDialog(). For example:
Public Shared Sub Main()
Application.Run(New TestForm())
End Sub

Tom Dacon
"news.microsoft.com" <au****@aussie.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #2

P: n/a
* "news.microsoft.com" <au****@aussie.com> scripsit:
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(New MainForm())' instead. Nevertheless, this won't
help if there are no error handlers implemented...

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.