Solved

Delphi X Application

Posted on 2009-07-16
4
279 Views
Last Modified: 2013-11-23
When a person use the X button to terminate my App, what messages are sent to Delphi and how can I caught it code.?
0
Comment
Question by:gdavidshaw
  • 2
4 Comments
 
LVL 14

Expert Comment

by:SteveBay
ID: 24871118
You will want to use the Form's OnCloseQuery Event there you can decide whether to allow a close or not.
0
 

Author Comment

by:gdavidshaw
ID: 24872601
What about the being cut off by the Task Manager?
0
 
LVL 14

Accepted Solution

by:
SteveBay earned 250 total points
ID: 24872690
A close request from task mgr will cause the OnCloseQuery Event to fire but if the program does not finish it's work and close in time then task mrg's "End Program" prompt will appear and there is not much that can prevent that from closing the program.
0
 
LVL 2

Assisted Solution

by:gtrifidis
gtrifidis earned 250 total points
ID: 24877124
If the user terminates - kills the application from taskmanager no message will be send to the application.

As i said in this post
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_24573634.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now