473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Cannot Handle Exception

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
Nov 23 '05 #1
3 1823
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

Nov 23 '05 #2
> Private Sub MyApplication_UnhandledException(ByVal sender As
Object, ByVal e As
Microsoft.VisualBasic.ApplicationServices.Unhandle dExceptionEventArgs)
Handles Me.UnhandledException


Yeah thats what I was looking for! However, this exception isn't passed to
the handler. Any ideas why this may happen?

TIA
Nov 23 '05 #3
Hi,

Maybe contact the maker of the third party control to see if they
have an update.

Ken
---------------
"elziko" <el****@yahoo.co.uk> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
Private Sub MyApplication_UnhandledException(ByVal sender As
Object, ByVal e As
Microsoft.VisualBasic.ApplicationServices.Unhandle dExceptionEventArgs)
Handles Me.UnhandledException


Yeah thats what I was looking for! However, this exception isn't passed to
the handler. Any ideas why this may happen?

TIA

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lionel Schiepers | last post by:
In the code below (called from an ASPX page), does someone known why a 'System.DllNotFoundException' exception is throw when the thread created by 'cppextension::MyExtension::Test()' starts to...
0
by: Abhi | last post by:
The applicaiton through which the service is created, doesnt give that error. To check the exact issue, I tested with a service containing this block of code. The service gives the error when...
2
by: Tim Reynolds | last post by:
Team, When my web service throws an exception and I am debugging on my PC - I get the exception back in my browser fine. My web.config shows <customErrors mode="Off"/> and this is working well. ...
8
by: dbuchanan | last post by:
Hello, What does this error mean? "The event click is read-only and cannot be changed" This is a design-time error. It is displayed instead of the form. Here is the full text \\ "One or...
1
by: Steve | last post by:
I want to ask if .NET cannot handle WSDL with exception <wsdl:fault> element? <wsdl:fault name="CreditCardWizardException"> <soap:fault name="CreditCardWizardException" use="encoded"...
3
by: thomson | last post by:
Hi All, Are there any sort of exceptions that cannot be caught by the Runtime, Any Insights? Thanks in Advance thomson
0
by: shaily | last post by:
hi I have a java web service called "Registration service" and C# client which is a consumer of that service java web service running under Tomcat has following interface API exposed ...
6
by: Liming | last post by:
Hi, In a typical 3 tier model (view layer, busines layer and data access layer) where do you handle your exceptions? do you let it buble up all the way to the .aspx pages or do you handle it in...
9
by: =?Utf-8?B?UmFq?= | last post by:
How do I know which methods will throw exception when I am using FCL or other third party .Net library? I am developer of mostly native Windows applications and now .Net. After working few...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.