Can anyone there help me with this problem .. i'm intended to prompt out a msg dialog after the users press the "Escape" key.. so what's the code for it??
thx in advance..
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if (ord(Key)=27) then // if key is ESC
ShowMessage('your text');
end;
// a better message box is MessageDlg();
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.