Recent

Author Topic: How To Create An Application.OnEndSession Event Handler  (Read 3470 times)

Marion

  • Full Member
  • ***
  • Posts: 125
How To Create An Application.OnEndSession Event Handler
« on: March 19, 2012, 08:33:36 pm »
I have seen references to creating an Application.OnEndSession event handler, but I don't know how to do it in the IDE.
Thank you,
Marion
(A recovering Windows programmer.)

tomek

  • Jr. Member
  • **
  • Posts: 85
Re: How To Create An Application.OnEndSession Event Handler
« Reply #1 on: March 19, 2012, 09:57:29 pm »
OnFormCreate:
Code: [Select]
Application.OnEndSession := @OnEndSessionApp;
and as example:
Code: [Select]
procedure TForm1.OnEndSessionApp(Sender: TObject);
begin
  TForm1.Close;
end;

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: How To Create An Application.OnEndSession Event Handler
« Reply #2 on: March 20, 2012, 10:11:40 am »
note: Application.OnEndSession call is not implemented on Mac OS X.

 

TinyPortal © 2005-2018