Hi
i have an application that creates a new window when the user presses a button. when the user wants to come out of the fullscrenn they press the ESCAPE key and this changes the window back to its orgional state.
also this ESCAPE key needs to exit the application IF its not in fullscreen mode.
The problem i have is when the user is in fullscreen and presses ESCAPE it exits the application. or if i dont have the second part it will just exit full screen
here is the code i am using
Code:
if(Key == VK_ESCAPE) // if the user presses the ESCAPE key
{
imgImage->Height = ScreenHeight;
imgImage->Width = ScreenWidth;
imgImage->Stretch = true;
Form1->BorderStyle = bsToolWindow;
Form1->Height = 754;
Form1->Width = 1070;
Form1->Left = 190;
Form1->Top = 115;
Panel1->Visible = true;
Label1->Visible = true;
Prop->Visible = true;
Stretch->Visible = true;
ProgressBar1->Visible = true;
StatusBar1->Visible = true;
spOpen->Visible = true;
spSave->Visible = true;
if(Key == VK_ESCAPE)
{
Application->Terminate();
}
}
Can anyone help?