Autor Beitrag
Gerhard
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Mi 31.03.04 20:24 
Hi,

Ich versuche den Ablauf eines Programmes mit den Tastaturtasten zu steuern. Mit den "einfachen Tasten" ist dies auch kein Problem.

Mein Source für die einfachen Tasten:
Procedure TFormX.FormKeyDown(Sender:Tobject; var Key:Word; Shift:TShiftState);
...
Taste:=ord(Key);
...
//Anzeige als Label
LabelX.Caption:=Inttostr(Taste);


Aber: von den Pfeil-Tasten kommt keine Antwort!


Danke für Hinweise!

Gerhard
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: Mi 31.03.04 21:42 
hallo,
weiß nicht inwieweit dir das weiterhilft. das was dich interessieren sollte steht ziemlich weit unten: Forum: Interruptprogrammierung

Hoffe es hilft dir!

Rokdd
Socher
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 45

warmes flüssiges Blut
D7 Prof, D8 Prof
BeitragVerfasst: Mi 31.03.04 22:20 
Titel: KeyDown
Verwende das Ereignis KeyDown, Interruptprogrammierung ist hier wirklich nicht notwendig!

Beispiel:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if key=VK_DOWN then beep;
end;


Siehe Delphi-Hilfe: Virtuelle Tastencodes

VK_LBUTTON Linke Maustaste
VK_RBUTTON Rechte Maustaste
VK_CANCEL Strg+Untbr
VK_MBUTTON Mittlere Maustaste
VK_BACK Taste Rück
VK_TAB Taste Tab
VK_CLEAR Taste Clear
......
....
..

Moderiert von user profile iconMotzi: Delphi-Tags hinzugefügt.

_________________
FREIHEIT
NetZwerg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: Mi 31.03.04 22:26 
und so geht es für die Buchstaben:

A: key = 65
B: key = 66
C: key = 67
[...]

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: Do 01.04.04 05:24 
lurze anmerkung. unten im thread standen genau diese codes. ich habe extra unten geschrieben!

Rokdd