-
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
-
Re: exit code
Well if you're in the main method... you can just return 0;