Autor Beitrag
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Sa 22.03.08 18:20 
Hi,

ich habe eine Form, die ich über showModal anzeigen lasse. Die OnKeyPress-Procedure(ist korrekt zugewiesen, also daran liegts nicht :lol: ) der modalForm wird nun nicht ausgeführt(mit Esc soll sie geschlossen werden). Ich habe das mit einem beep getestet, also wird sie wirklich garnicht aufgerufen.
Am showModal liegt es auch nicht, ich hebe es gerade mit show gezeigt...

Wird die standardmäßig bei zweitForms nicht zur Verfügung gestellt, oder was? Kann ich mir eigentlich nicht vorstellen...

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
PeterPain
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 83



BeitragVerfasst: Sa 22.03.08 18:29 
hi,

Wieso bitte hast du das mit Beep getestet? Da kräuseln sich mir die Nackenhaare! Schonmal was von Brakepoints und debugging gehört? ;)

Anyway, Setzt mal KeyPreview der Form auf True, das könnte helfen.


gruss
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Sa 22.03.08 18:34 
Hast du auf dem Formular irgendein Edit Feld oder so, das den Focus hat?
Setz mal TForm.KeyPreview aut true.

Edit:
Notiz an mich selbst: Erst die Antworten lesen.. ;)
Hidden Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Sa 22.03.08 18:44 
Hi,

Jo, KeyPreview wars, danke. Werde in Zukunft breakpoints verwenden, danke auch für den Tipp :wink: . Edit: Frage ich mich nur, warum das nicht standardmäßig beim beschreiben der OnKeyPress-Prozedur gemacht wird :roll:

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)