PC Review


Reply
Thread Tools Rate Thread

Catching exceptions in an OnPaint PictureBox event

 
 
Nuno Magalhaes
Guest
Posts: n/a
 
      26th Sep 2005
How can I catch an exception inside an event? I want to capture the
exception of an OnPaint event in a picturebox because sometimes it's
not displayed and gives me an error.

Another question BTW, how can I kill all threads of my application in a
simple and effective way?

Thank you,
Nuno Magalhaes.

 
Reply With Quote
 
 
 
 
Nuno Magalhaes
Guest
Posts: n/a
 
      26th Sep 2005
I already know it's like this:

protected override void OnPaint(PaintEventArgs pe)
{
try
{
base.OnPaint(pe);
}
catch(Exception)
{
}
}

Thanks anyway.


Nuno Magalhaes wrote:
> How can I catch an exception inside an event? I want to capture the
> exception of an OnPaint event in a picturebox because sometimes it's
> not displayed and gives me an error.
>
> Another question BTW, how can I kill all threads of my application in a
> simple and effective way?
>
> Thank you,
> Nuno Magalhaes.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Catching exceptions Andy B. Microsoft C# .NET 3 16th Mar 2010 10:33 AM
Catching Exceptions Jeffrey Walton Microsoft C# .NET 5 25th Nov 2007 12:05 AM
catching exceptions bitshift Microsoft Dot NET Framework 4 31st Aug 2007 10:51 AM
Catching exceptions from a FileSystemWatcher event handler =?Utf-8?B?T2xl?= Microsoft Dot NET Framework 2 10th Aug 2005 02:56 PM
Catching ALL Unhandled Exceptions James Hancock Microsoft Dot NET Framework 5 13th Jan 2004 04:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:04 PM.