Jump to content
Registration disabled at the moment Read more... ×
Sign in to follow this  
Ian Branch

Run a form on application exit??

Recommended Posts

Hi Team,

Is it possible to run a form from the project (.dpr) file, after the main form has exited??

i.e. after 'Application.Run'

The reason is I want to have an absolutely last action taken after the Application is exited, if that makes sense??  Probably not. :-(

I know I can put something as the last action in the OnClose event, or maybe even in the OnDestroy event..

 

Regards & TIA,

Ian

 

Share this post


Link to post
4 minutes ago, Ian Branch said:

I know I can put something as the last action in the OnClose event

Use OnCloseQuery in the main form, and prevent the main form from closing unless the "exit" form has already been shown. If it hasn't been shown, show it 🙂

 

Share this post


Link to post

Hi Dave,

Yes that is another option.  The form won't actually be showing it will be opening a database updating a record and then closing the database again.  Then the form can close.

I may well use a datamodule, I am just investigating the concept att.

 

Ian

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×