Yeah, and try something like this:
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
try
{
int zero = 0;
int one = 1;
int exception = one / zero;
}
catch
{
throw new InvalidOperationException();
}
}
Let's say the exception is done by a third part plugin, so you can't control it. Want you try to catch it in the Application.ThreadException event? Ok, try it! ;) Not all scenarios allow you to fill the catch block.
free .net reporting and gdi+ tools www.neodatatype.net