O/H Andries Bos έγραψε:
> Hello
> Is there way to detect (via en global variable) that the aplication is busy
> terminating or to I have to introduce my own variable?
>
> regards
>
> andries
> The Netherlands
>
You may check the Application.Terminated property
which, according to Delphi's online help,
"Reports whether the application is in the process of shutting down."
I prefer using a singleton class/object which controls
the whole application and provides, among others, 4 properties:
Initializing, Initialized, Finalizing, Finalized.
For example
procedure TMainModuleBase.Initialize;
begin
if not FInitialized then
begin
FInitializing := True;
try
DoInitialize; { it's a protected virtual call }
FInitialized := True;
finally
FInitializing := False;
end;
end;
end;
The Finalize() method is similar to the above.
--
Regards
Theo
------------------------
Theo Bebekis
Thessaloniki, Greece
------------------------
Greek_Delphi_Prog : a Delphi Programming mailing list in Greek at
http://groups.yahoo.com/group/Greek_Delphi_Prog
CSharpDotNetGreek : A C# and .Net mailing list in Greek language at
http://groups.yahoo.com/group/CSharpDotNetGreek
atla_custom : a Unisoft Atlantis Customization mailing list at
http://groups.yahoo.com/group/atla_custom
------------------------
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/delphi-en/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/