Nat Luengnaruemitchai

Geek Blog

  Home  |   Contact  |   Syndication    |   Login
  99 Posts | 0 Stories | 212 Comments | 236 Trackbacks

News

Archives

Post Categories

Blogroll

If you ever use do multi-threaded programming and use Control.Invoke to invoke a method on GUI Thread, you might experience this problem before. You throw an exception with the hope that ThreadException will get it but wrong. It won't get it as the method Control.Invoke will actually catch the exception and then serialize it and throw it back in the calling thread. This is annoying since you expect to use ThreadException to handle it.
posted on Thursday, June 16, 2005 10:27 PM

Feedback

# re: C# IAQ #6: Why Can't I Throw An Exception in GUI Thread and Let Application.ThreadException Handle It? 10/13/2006 3:32 AM Kristian
Try Control.BeginInvoke() instead. See http://www.codeproject.com/csharp/begininvoke.asp

/Kristian :-)

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: