(Gast)
n/a Beiträge
|
Re: 2 Tasten gleichzeitig!!!
4. Mär 2009, 17:03
Machs so
Delphi-Quellcode:
TForm1 = class..
public
...
Keys: Array[Byte] of Boolean;
procedure RefreshKeys;
end;
--
procedure TForm1.RefreshKeys();
var
i: Integer;
begin
for i := 0 to $FF do
Keys[i] := GetAsyncKeyState( i ) <> 0;
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
RefreshKeys;
end;
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
RefreshKeys;
end;
|
|
Zitat
|