
Unhandled Exception is thrown
Hello Randy,
Quote:
> Is there a way I can catch any exception and not show the "unhandled
> exception dialog box".
Maybe this helps (untested):
\\\
AddHandler Application.ThreadException, AddressOf ErrorHandler
.
.
.
Private Sub ErrorHandler( _
ByVal sender As Object, _
ByVal e As System.Threading.ThreadExceptionEventArgs _
)
Debug.WriteLine("Fehler: " & e.Exception.Message)
End Sub
///
-- or --
\\\
Public Sub Main()
Try
Application.Run(New Form1())
Catch ex As Exception
MsgBox(...)
End Try
End Sub
///
You must add the following code to your <Appname>.exe.config file or the
machine.config:
\\\
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
///
Regards,
Herfried K. Wagner