Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...