Do you have any Keydown or keypress procedures in that form?  How
about a default behavior set  on the button?  I got caught on something
similar a while back where the form's default control was a bitbutton.  

from Robert Meek dba Tangentals Design


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Rainer von Saleski
Sent: Wednesday, December 14, 2005 12:02 PM
To: [email protected]
Subject: Unexpected Exit from ShowModal Form

I use ShowModal forms all over the place ... and they all have a button that

does some cleanup and sets ModalResult to mrOK in order to exit ... and the 
button only activates when the user clicks it, or the button has the focus 
and the user presses Return (I think).

But I have one form, not horribly complex, where pressing Return causes the 
form to exit, no matter where the focus is (seemingly).  It has 2 TListViews

(View Style = vsReport), 3 panels, a dozen buttons, half a dozen check 
boxes, one combo edit box, half a dozen labels, three timers, and a Rave 
RvSystem.

Any ideas?  It's driving us nuts, because we "feel" like hitting Return all 
too often.

Rainer

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to