Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi KeyPress auf Formular? (https://www.delphipraxis.net/12375-keypress-auf-formular.html)

Plague 10. Apr 2004 16:22

Code zum Drücken der F7-Taste?
 
Hallo,

ich hänge im Moment an dem Problem, dass ich bei einem Druck auf die F7-Taste eine Aktion ausführen möchte. Genauer möchte ich die Form2 zeigen. Ich habe das so gemacht:
Delphi-Quellcode:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if vk_F7 = true then begin
   Form2.show;
   end;
end;
Aber so klappt es nicht.
Wie muss ich das machen?

Gruß
Thomas

Luckie 10. Apr 2004 16:24

Re: KeyPress auf Formular?
 
Lass den Vergleich mit True mal weg:
Delphi-Quellcode:
if Key = VK_F7 then

Splinter 24. Mai 2004 15:25

Re: KeyPress auf Formular?
 
bei mir klappt das auch nicht :/

Chris1986 24. Mai 2004 15:37

Re: KeyPress auf Formular?
 
So gehts:
Delphi-Quellcode:
if key = vk_F7 then begin
   Form2.show;
   end;
MfG
Christian


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:27 Uhr.
Seite 2 von 2     12   

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