Hi Leute
Folgendes Problem:
Ich will einfach auf Tastendruck ein Ereignis starten, hab schon (fast) ewig herumgesucht und -probiert, klappt aber nie!!!
Kann doch nicht so schwer sein
Also hier mein Code:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19:
| ...
type TForm1 = class(TForm) Label1: TLabel; procedure Form11KeyPress(Sender: TObject; var Key: Char);
...
procedure TForm1.Form11KeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin label1.caption := 'klappt'; end; end;
end. |
Das Programm startet auch, aber es passiert einfach nichts, wenn ich etwas drücke!
Falls jemand was weiß, bitte antworten oder kennt jemand ein gutes Tutorial o.ä. zum Thema?
Also schon mal Danke,
mfg
PS: #13 ist schon die Eingabetaste, oder?
Moderiert von
Christian S.: Delphi-Tags hinzugefügt.Moderiert von
UGrohne: Topic aus Sonstiges verschoben am Mo 04.07.2005 um 11:19