Cannot Catch Exception

  • Thread starter Thread starter Nick Bunton
  • Start date Start date
N

Nick Bunton

I have a C# Windows Forms application and on one of my
user controls an exception is being throw, I cannot catch
this anywhere and I end up in the starting class on the
Application.Run(blotter); line. Why is this exception
bypassing all my try catch blocks and the global excetion
handler?

TIA

Nick
 
Nick Bunton said:
I have a C# Windows Forms application and on one of my
user controls an exception is being throw, I cannot catch
this anywhere and I end up in the starting class on the
Application.Run(blotter); line. Why is this exception
bypassing all my try catch blocks and the global excetion
handler?

What exception?
 
Well there is two really I am getting the exception.

Cannot access a disposed object named "MonthCalendar".
Object name: "MonthCalendar".

A friend of mine is experiencing the same issue with an
Infragistics object, he has wrapped every call to
Infragistcs with a try catch and it still errors like
mine with ? not set to an instance of an object.

Sorry if thats not very clear.
 
Nick, Do you have a small code sample that creates this problem that we can look at here? Are these all third party controls? If so, can you repro with Built in controls?


Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.

Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect


--------------------
 
Nick Bunton said:
Cannot access a disposed object named "MonthCalendar".
Object name: "MonthCalendar".

A friend of mine is experiencing the same issue with an
Infragistics object, he has wrapped every call to
Infragistcs with a try catch and it still errors like
mine with ? not set to an instance of an object.

Do you access a MonthCalendar in your application? Can you post some
code to reproduce the problem?
 
Hi Yes I have a custome control which consists of a
textbox, combo and a MonthCalendar control. on my main
control this appears as a combo which you can type dates
into and if you drop the combo, the MonthCalendar control
is shown. The error is when you click Today on the
MonthCalendar. This is so intergrated with a huge
application that I cannot send it to you, however I will
try and recreate this in a small application tomorrow and
post it here.

Thanks

Nick
 
HI Scot when I get the exception it is using only
intrinsic controls to VS .NET. I will try and recreate
this tomorrow with a tiny app and if successful I will
post here.

Thanks

Nick
-----Original Message-----
Nick, Do you have a small code sample that creates this
problem that we can look at here? Are these all third
party controls? If so, can you repro with Built in
controls?
 
Back
Top