Autor Beitrag
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Di 26.09.06 18:01 
Hi allerseits,
ich stehe mal wieder vor einem Problem. Ich würde gerne eine Prozedur ausführen, wenn man in der Edit-Komponente die Enter-Taste drückt (ähnlich wie bei einer Konsole). Aber ich finde nicht das richtige Ereignis. Immerzu muss ich zusätzliche Buttons einführen.
Weiß jemand wie das geht?
Gruß
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Di 26.09.06 18:05 
Hallo,

gab es hier schon oft:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
//OnKeyDown
if Key = VK_RETURN then
  DoSomething;

//OnKeyPressed
if Ord(Key) = VK_RETURN then
  Key := #0;
(Aus dem Kopf.)

Wenn du diesen "Ding"-Klang beim Enterdrücken noch weghaben willst, dann musst du suchen (Swissdelphicenter...). Das weiss ich nicht aus dem Kopf.

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Calculon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Di 26.09.06 18:15 
Jepp.
Danke funktioniert! Ich schaue mal, ob ich den Ton auch noch irgendwie wegkriege.
Gruß
Calculon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Di 26.09.06 18:25 
Hab's gefunden (bei Swissdelphicenter). Der Vollständigkeit halber führe ich's mal auf:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
//OnKeyPressed
if (key = #13) or (key = #10) then
begin
key = #0;
end;


Gruß