Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10339
| From | Karl Wochele <kw@ecos-system.invalid> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Terminating an application which runs in the background |
| Date | 2017-03-24 09:02 +0100 |
| Organization | solani.org |
| Message-ID | <ob2jq5$k8c$1@solani.org> (permalink) |
| References | (1 earlier) <ejhderF228pU1@mid.individual.net> <f0134433-5172-428c-961b-2f119105a185@googlegroups.com> <ejhgf5F2ku3U1@mid.individual.net> <5a9a7f2c-3cf1-460a-aa98-7d1715b056bd@googlegroups.com> <ejjvlmFhsc4U1@mid.individual.net> |
Hi Wolfgang,
> P.S. unfortunately such a powerful feature is missing in the .NET
> framework
I'm just taking my first steps in .NET. Somewhere I found somemthing
similar to VO-Error-handling. Used this in my first app and it works
pretty well. But please don't ask for explanations...
Karl
#using System.Windows.Forms
#using System.Drawing
#USING System.Threading
[STAThreadAttribute];
FUNCTION Start( asCmdLine AS STRING[] ) AS INT
LOCAL oForm AS BasicForm
Application.EnableVisualStyles()
Application.DoEvents()
Application.ThreadException +=
ThreadExceptionEventHandler{MyThreadException}
AppDomain.CurrentDomain.UnhandledException +=
UnhandledExceptionEventHandler{MyUnhandledException}
oForm := BasicForm{}
Application.Run(oForm)
RETURN 0
STATIC FUNCTION MyThreadException(sender AS OBJECT,e AS
ThreadExceptionEventArgs) AS VOID
HandleException(e.Exception)
RETURN
STATIC FUNCTION MyUnhandledException(sender AS OBJECT,e AS
UnhandledExceptionEventArgs) AS VOID
HandleException((Exception)e.ExceptionObject)
RETURN
STATIC FUNCTION HandleException(e AS Exception) AS VOID
messagebox.show( e.Message+;
convert.tochar(13)+convert.tochar(10)+;
convert.tochar(13)+convert.tochar(10)+;
"Die Anwendung wird jetzt beendet...","Hinweis")
Application.Exit()
RETURN
Am 24.03.2017 um 08:20 schrieb Wolfgang Riedmann:
> Hi Stefan,
>
>> monitoring is an interesting approach.
>>
>> When a VO runtime error occurs, there must be a possibility to
>> perform an action before the application terminates.
>
> of course this is possible - and I do it all the time. Just install
> your own error handler and it will be called when an error occurs. In
> this error handler, depending on the situation, you could terminate the
> child process.
>
> Just seek for "ErrorBlock" in the online help.
>
> Wolfgang
>
> P.S. unfortunately such a powerful feature is missing in the .NET
> framework
>
>
>
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 00:17 -0700
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-23 08:51 +0100
Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 01:10 -0700
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-23 09:48 +0100
Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 02:30 -0700
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 08:20 +0100
Re: Terminating an application which runs in the background Karl Wochele <kw@ecos-system.invalid> - 2017-03-24 09:02 +0100
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 09:17 +0100
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 09:24 +0100
Re: Terminating an application which runs in the background Karl Wochele <kw@ecos-system.invalid> - 2017-03-24 10:05 +0100
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 10:29 +0100
Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-28 00:10 -0700
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-28 09:54 +0200
Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-28 04:09 -0700
Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-28 14:28 +0200
Re: Terminating an application which runs in the background Guy Deprez <dpzguy@skynet.be> - 2017-03-23 09:20 +0100
Re: Terminating an application which runs in the background Karl Wochele <kw@ecos-system.invalid> - 2017-03-23 11:20 +0100
Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 03:54 -0700
csiph-web