Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi Pling bei Focuswechsel (https://www.delphipraxis.net/210625-pling-bei-focuswechsel.html)

NoGAD 19. Mai 2022 09:58

AW: Pling bei Focuswechsel
 
Zitat:

Zitat von BerndS (Beitrag 1506061)
Das Pling sollte verschwinden, wenn man auch KeyPress behandelt.
Etwas so:
Delphi-Quellcode:
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #13 then
    Key := #0;
end;

Das war die Lösung, die geholfen hat!

Vielen Dank :-)

himitsu 19. Mai 2022 12:07

AW: Pling bei Focuswechsel
 
Grund: Das Pling kommt beim Drücken der Taste ... OnKeyDown und OnKeyPress sind Drück-Ereignisse, während OnKeyUp erst beim Loslassen passiert.
OnKeyDown ist noch vor OnKeyPress und dort ein Key:=0 bricht somit noch etwas früher ab, aber ebenfalls noch vor dem Pling.


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz