Re: error handling

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




<thomasp@xxxxxxxxx> wrote in message
news:4316f803$0$6957$b9f67a60@xxxxxxxxxxxxxxxxxxxxx
>
> If I have a Try Catch block that captures an exception in a function
> located
> in a module called by a form, in other words burried in the code, and this
> exception is not one that can be corrected, how do I exit the program? I
> have a nice messagebox pop up and tell the user that there has been an
> error
> and the program needs to be shut down, but I don't know how to code the
> shut
> down.
>
> Thanks,
>
> Thomas
>
> --
> Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
> ------->>>>>>http://www.NewsDemon.com<<<<<<------
> Unlimited Access, Anonymous Accounts, Uncensored Broadband Access

Look up the Application.Exit() method in your MSDN help. I believe that will
do what you want,

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.




.



Relevant Pages

  • Re: problem with sending xml documents over network
    ... What version of the compiler? ... I'm not getting an exception when I should. ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.help)
  • Re: very simple encryption
    ... I just need a simple way to encrypt/decrypt a string, main purpose is, ... public static void mainthrows Exception { ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.programmer)
  • error handling
    ... If I have a Try Catch block that captures an exception in a function located ... and the program needs to be shut down, but I don't know how to code the shut ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Sub Main()
    ... no longer work. ... I will have to do some reading on Exception ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (microsoft.public.dotnet.languages.vb)
  • Re: problem with sending xml documents over network
    ... your code works fine on Linux. ... There appears to be a bug in the Windows runtime that doesn't throw an exception when an attempt is made to create a socket to an un-open port. ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.help)