Hi,
Open my project and check the enable application framework check
box in the application tab. Click view application events button which will
open applicationeven ts.vb. In the combobox on the top left select
myapplication events. In the box on the right select unhandledExcept ion.
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.
' UnhandledExcept ion: Raised if the application encounters an unhandled
exception.
' StartupNextInst ance: Raised when launching a single-instance
application and the application is already active.
' NetworkAvailabi lityChanged: Raised when the network connection is
connected or disconnected.
Partial Friend Class MyApplication
Private Sub MyApplication_U nhandledExcepti on(ByVal sender As Object,
ByVal e As
Microsoft.Visua lBasic.Applicat ionServices.Unh andledException EventArgs)
Handles Me.UnhandledExc eption
End Sub
End Class
End Namespace
Ken
-------------------
"elziko" <el****@yahoo.c o.uk> wrote in message
news:u7******** ******@TK2MSFTN GP14.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.OutOfMem oryException is
thrown my something but my codes breaks at the difition of my class:
"Public Class MainForm"
...so I'm assuming that the OutOfMemoryExce ption 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