CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Posts
    285

    escape,terminate

    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

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: escape,terminate

    What is the application code using ? C/C++ or VB or .Net ?

  3. #3
    Join Date
    Mar 2006
    Posts
    12

    Re: escape,terminate

    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)
    Kavitesh Singh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured