Click to See Complete Forum and Search --> : escape,terminate


Leite33
September 22nd, 2008, 09:55 AM
Hi
I have a form and i want when the user press the button escape the application will terminate....Better if gets a message so he can confirm if he is sure to terminate the application...
Thanks

kirants
September 22nd, 2008, 03:01 PM
What is the application code using ? C/C++ or VB or .Net ?

kavitesh
September 25th, 2008, 11:20 PM
Well you just need to get the keyboard input in you application and check if ESC key is pressed.

Just look for VK_ESCAPE in the WM_KEYDOWN: message in your callback function.
You can do whatever you want before you send WM_CLOSE message to terminate the application(if you want to do it when user presses ESC key)