Link to home
Start Free TrialLog in
Avatar of delphcon5
delphcon5

asked on

Creating threads

Hello, what is a good way to make a function or procedure run after your program has been closed?
Avatar of Ivanov_G
Ivanov_G
Flag of Bulgaria image

1) OnClose event
2) in Application.OnTerminate
3) catch WM_QUERYENDSESSION and WM_ENDSESSION for shudown/restart
Avatar of Ferruccio Accalai
From the program itself or from outside?
Avatar of delphcon5
delphcon5

ASKER

from the program, or from outside like making a dll file, anything would work, can you inject a dll into a process like explorer?
ASKER CERTIFIED SOLUTION
Avatar of php4delphi
php4delphi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is that two ways to do it?
Nevermind i got it.