- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Arrow and Function Keys

Question:

How can I trap the Arrow and Function Keys?

Answer:

Check for the correct virtual key in the KeyDown event for the
form.

Example:

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = VK_RIGHT then
    Form1.Caption := 'Right';
  if Key = VK_F1 then
    Form1.Caption := 'F1';
end;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile