![]() |
Re: Codes für KeyPress Ctrl shift delete Pfeil
Hallo,
ist da nicht ein Denkfehler drin?
Delphi-Quellcode:
Müsste es nicht etwa so aussehen?
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin if key =#27 then caption:='esc'; // OK if key = Ord('c') then caption:='Taste C'; // Passiert nichts if key =#43 then caption:='Taste C'; // auch nichts end;
Delphi-Quellcode:
Key ist bereits das Zeichen und muss nicht mit Ord "übersetzt" werden, bei KeyDown und KeyUp bekommt man jedoch Key als Word geliefert.
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin Case Key of #27 : caption := 'esc'; // OK 'c' : caption := 'Taste c'; // OK 'C' : caption := 'Taste C'; // OK end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:05 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz