Results 1 to 2 of 2

Thread: exit code

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2008
    Posts
    58

    exit code

    Hi
    I wanna ask how i can write a code so when the user press the key exit the application will terminate...
    Something like that for example but doesnt work:
    ----------------------------------------
    if(Key==VK_ESCAPE)
    {
    Key=0;
    Application->Terminate();
    ------------------------------------------
    Where i will put this code in what event??? Are there other ways by pushing the escape??? If i want to ask the user with a message if he sure to exit how the code will be ???
    Any ideas will be welcome... Thanks

  2. #2
    Hyperactive Member pgag45's Avatar
    Join Date
    Mar 2007
    Location
    Colorado
    Posts
    262

    Re: exit code

    Well if you're in the main method... you can just return 0;

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