Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 30.03.05 08:34 
ich würde gerne in meinem Programm die Esc-Taste abfangen, weiss aber nicht was ich für die drei XXX nehmen muss.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
f Key = XXX    then
  begin
    ShowMessage('OK, Esc wurde gedrückt');
  end;


das ganze befindet sich in der:
procedure Tfrm_buchung.FormKeyPress(Sender: TObject; var Key: Char);

Moderiert von user profile iconmatze: Code- durch Delphi-Tags ersetzt.
demo88
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Ubuntu 6.04, Win XP
Delphi 7
BeitragVerfasst: Mi 30.03.05 08:38 
Ich meine mich zu erriner das das so war:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
if key=VK_ESCAPE then   
  begin   
    ShowMessage('OK, Esc wurde gedrückt');   
  end;
firus1983
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 170

Win98,XP,
D6 Entrpr
BeitragVerfasst: Mi 30.03.05 08:39 
Und warum suchst du dann nicht einfach nach Key-Codes hier im Forum ???

_________________
Veni Vidi Codi !
Ich kam, sah, und programmierte !
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 30.03.05 08:45 
@demo88 das geht so leider nicht, da kommt bei mir immer die Meldung:
Inkompatible Datentypen.
firus1983
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 170

Win98,XP,
D6 Entrpr
BeitragVerfasst: Mi 30.03.05 08:48 
Je nach dem, ob du auf OnKeyDown, KeyPress etc. reagierst kannst du virtuelle Tastencodes nehmen oder du musst eben mit der ASCII-Code Tabelle arbeiten.
bei VK_Escape solltest du das KeyDown Ereignis versuchen

_________________
Veni Vidi Codi !
Ich kam, sah, und programmierte !
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 30.03.05 09:34 
OK, danke, hat geklappt.