woklet Posted August 9, 2005 Posted August 9, 2005 I am trying to write a "global error handler" in vb.net. I'm trying to do something like this... Module Module1 Public mainForm As System.Windows.Forms.Form Sub Main() Try mainForm = New Form1 Application.Run(mainForm) Catch ex As Exception MsgBox("error has occurred") End Try End Sub End Module The program runs, but when I get an error it gives me the "normal" windows/.NET error box; not my msgbox(). Any thoughts??? Thanks Ben Quote
mskeel Posted August 9, 2005 Posted August 9, 2005 What does the normal .net error box say? What is there error you are getting? Is there more code in your application than what is shown? Quote
woklet Posted August 9, 2005 Author Posted August 9, 2005 I'm sorry...thanks for the quick response; but I just figured out what I need to do. I use the Application.ThreadException Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.