Arrow Key Pressed

Posted by Stowaway on March 09, 2009

Im trying to make an application that watches for the arrow key presses. Ive got it working but for some reason it only works when i hold the ALT key down.
how can i get around this?

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of
VK_LEFT: label1.Caption := 'This is Left Key';
VK_UP : label1.Caption := 'This is the up key';
end;
end;

Related articles

       

Follow Ups