473,748 Members | 9,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Nov 23 '05 #2
> 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


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.c o.uk> wrote in message
news:er******** ******@TK2MSFTN GP12.phx.gbl...
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


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
1773
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 execute the function 'managedFunc' that use .NET code ? This piece of code works when I use Visual Studio 2002. The same code compiled in a console application works with Visual Studio 2003. The code executes under IIS 5.1 on Windows XP.
0
2216
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 run as local system or even in an account (mine) For this block of code Private Sub Timer1_Elapsed(ByVal sender As Object, ByVal e
2
8145
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. However, when I test this web service on the deployment server, I only get 'The page cannot be displayed' instead of the exception. That is when I call the web service on the deployment server locally or remotely. The web.config on the...
8
7032
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 more errors encountered while loading the designer. The errors
1
2246
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" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://CreditCardwizard.wws" /> </wsdl:fault> I am using VS.NET and generate the client-side proxies, but it seems
3
3915
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
3578
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 public RegistrationResponse registerDevice(RegistrationRequest regReq) throws RemoteException
6
2052
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 your business layer and/or data access layer? suppose in my data access layer, I provide try and catch, log the exception and re-throw it back to business layer, then in yoru business layer, what do you do? throw it back to the code behind or...
9
1930
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 months in Java, I am thinking why Win32 APIs or even .Net documentation not clear on which methods will throw exception or what exceptions can be expected. Jave APIs clearly define exceptions that can be expected and enforces that we handle them. ...
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.