2 Replies - 1465 Views - Last Post: 03 April 2012 - 09:33 AM Rate Topic: -----

#1 blake11   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 20-February 08

Proper way to implement your own Exception Dialog Box

Posted 03 April 2012 - 05:38 AM

Well don't have any code just yet, but this is also not begging for homework. Just asking the proper way to go about implementing this.

In the past, I have opted to make my own Exception Dialog Box class that launches a generic form with the simple explanation of the exception, as well as the actual exception for debugging later. The only issue, is that most of the time when an exception is raised, the form would open the window, but freeze the opening the window. Is this because I am launching the window from the same thread that just caused the error. Should I Invoke the Exception class? If you have any ideas, tips, or links to other tutorials that might address this, it would be greatly appreciated.

Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Proper way to implement your own Exception Dialog Box

#2 Robin19   User is offline

  • D.I.C Addict
  • member icon

Reputation: 272
  • View blog
  • Posts: 552
  • Joined: 07-July 10

Re: Proper way to implement your own Exception Dialog Box

Posted 03 April 2012 - 07:18 AM

Use .Show instead of .ShowDialog. This will show a form in a non-blocking way. Note that any code under .Show will run without waiting for user input.
Was This Post Helpful? 1
  • +
  • -

#3 negligible   User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 302
  • Joined: 02-December 10

Re: Proper way to implement your own Exception Dialog Box

Posted 03 April 2012 - 09:33 AM

I also use .Show I call it from a method, which accepts Exception types as a parameter, to format and display exceptions for me. Saves me having to type it all out each time.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1