Autor Beitrag
flowstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 123

WinME
D6 Enterprise
BeitragVerfasst: Do 29.01.04 21:40 
Ich habe ein Onkey down ereignis und will die gedrückte Taste an ein aray übergeben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  Keys : array[0..255] of Booelan;
...
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  Keys[Key] := true;
end;


Aber wie frag ich nun ab ob, zb. die Taste 'W' gedrückt ist?
Ich habs so versucht aber geht nicht:

ausblenden Delphi-Quelltext
1:
if Keys[ord('w')] then ...					
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Do 29.01.04 21:43 
versuchs mal mit dem Großbuchstaben ;)
flowstar Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 123

WinME
D6 Enterprise
BeitragVerfasst: Do 29.01.04 21:48 
ich glaube ich sollte lieber ins Bett gehen und das Programmieren heute sein lassen :cry:
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Do 29.01.04 21:58 
wieso das denn? hats nciht geklappt? :
ausblenden Delphi-Quelltext
1:
if Keys[ord('W')] then ...					
flowstar Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 123

WinME
D6 Enterprise
BeitragVerfasst: Do 29.01.04 23:39 
doch klar
schäm mich bloß für meine Blödheit