Jump to content
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×