Recent

Author Topic: Application close query  (Read 909 times)

Borneq

  • Full Member
  • ***
  • Posts: 248
Application close query
« on: December 07, 2019, 08:50:00 pm »
I am writing multidocument Synedit editor with tabcontrol. If will not saved text in any editor, should ask user: Exit, Save, Cancel.
How prevent whole Application from closing without ask?

====
MainForm has events:
Code: Pascal  [Select][+][-]
  1. procedure TMainForm.FormClose(Sender: TObject; var CloseAction:
  2. procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose:

OK : FormCloseQuery !
FormClose - choosing if free, minimize etc
« Last Edit: December 07, 2019, 09:12:05 pm by Borneq »

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Application close query
« Reply #1 on: December 07, 2019, 09:27:02 pm »
you can open a questioner dialog box to get that info from the user, the event will not return until the user closes the dialog box and at  which point you can decide to call a common function to save the settings.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018