Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UnhandledExecption

Status
Not open for further replies.

XTnCIS

Programmer
Apr 23, 2002
57
0
0
US
I am learning the ropes in VB.Net and want to learn how to implement a global error routine in my VB.NET Windows Application.

I have found many textual examples of this, most talking about adding the controls to the main() sub. But I am just not getting it to work. I can create a main() but then the startup property only lists forms and I can't specify the main() sub I created.

Can anybody please point out a site where I might get a download for looking at how this was implemented?

 
Where are you creating the main() sub (e.g., in a module)?

Are you declaring it Public?



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
I created it in a module as public.

Where should it be created and how do you then set the vb.net windows application to start via that main() sub?

Thanks for replying!

(p.s. do you know of any downloadable examples?)
 
Well, the Startup object list in the project's properties window should have Sub Main listed as an option whether you actually have a Sub Main or not.

I don't know about a downloadable example, but I found this simple code that you can copy and paste:




I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top