Hi,
Open my project and check the enable application framework check
box in the application tab. Click view application events button which will
open applicationevents.vb. In the combobox on the top left select
myapplication events. In the box on the right select unhandledException.
Namespace My
' The following events are availble for MyApplication:
'
' Startup: Raised when the application starts, before the startup form
is created.
' Shutdown: Raised after all application forms are closed. This event
is not raised if the application terminates abnormally.
' UnhandledException: Raised if the application encounters an unhandled
exception.
' StartupNextInstance: Raised when launching a single-instance
application and the application is already active.
' NetworkAvailabilityChanged: Raised when the network connection is
connected or disconnected.
Partial Friend Class MyApplication
Private Sub MyApplication_UnhandledException(ByVal sender As Object,
ByVal e As
Microsoft.VisualBasic.ApplicationServices.Unhandle dExceptionEventArgs)
Handles Me.UnhandledException
End Sub
End Class
End Namespace
Ken
-------------------
"elziko" <el****@yahoo.co.uk> wrote in message
news:u7**************@TK2MSFTNGP14.phx.gbl...
I have a procedure that creates a bitmap of a certain size and then
displays it in a 3rd party component.
However, if the bitmap is very large then a System.OutOfMemoryException is
thrown my something but my codes breaks at the difition of my class:
"Public Class MainForm"
...so I'm assuming that the OutOfMemoryException occurs in the 3rd party
since I have put a Try-Catch block around my bitmap creation code and I am
unable to catch the error there. There is not other code run after this.
If the bitmap is too big then thats fine, but I **need** to handle the
exception. Is there any way of catching this exception and getting more
information about what threw it? Did I read something about some kind of
application level exception handling in VS2005? I can;t find any info
about it now!
TIA