Terminating delphi app

Hi!

Does anybody know how can i terminate an delphi application without the application.terminate procedure (and without the use of the forms unit)?

Thanks
johnny_35Asked:
Who is Participating?
 
simonetCommented:
You can send a WM_CLOSE message to the main window of the Delphi application. All this requires is the Windows unit in the uses clause.

Example:

SendMessage(Application.mainform.handle, WM_CLOSE, 0, 0);

Yours,

Alex
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.