Registriert seit: 15. Jul 2006
Ort: Bad Münstereifel
627 Beiträge
Delphi 5 Professional
|
Re: Was gibts für Möglichkeiten die Tastatur abzufragen?
15. Jul 2006, 18:07
Delphi-Quellcode:
var i:Integer;
keys:array[0..127] of Boolean;
procedure TForm1.FormClick(Sender: TObject);
begin
if timer1.enabled = false then begin
form1.width:=screen.width;
form1.height:=screen.height;
form1.position:=poscreencenter;
timer1.enabled:=true;
end
else
close;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
for i:=0 to high(keys) do keys[i]:=GetAsyncKeyState(i)=low(SmallInt);
if keys[VK_Down] then form1.canvas.Pixels[100,100]:=clred;
end;
end.
so ists doch richtig oder?
|