[DUG] Customised component and the Enter Key

Edward Koryagin ed_iv2001 at yahoo.co.nz
Thu Feb 15 14:44:20 NZDT 2007


We can override OnKeyXXX event and ...

if Key = VK_RETURN then
begin
// Call something...
Key := 0; // eat Key here
end;

--- Rohit Gupta <rohit at cfl.co.nz> wrote:

> If a receiving form closes on a keydown then the
> next form can receive 
> the keyup (depending on timing and OS and dlls
> installed).  It happens 
> on D5, D6, D7  etc..
> 
> This feature has been brought to you by the
> Illustrious Gates 
> consortium.  :-)
> 
> Robert martin wrote:
> > Hi Phil
> >
> > You are right !  We do use the OnKeyUp event.  I
> have just built a 
> > test app with our component and a plain TEdit
> control and both 
> > components get the Enter in their OnKeyUp event if
> they were the 
> > active component before the other screen was
> opened !!!
> >
> > We are using D6 could this be a bug?
> >
> > More importantly, assuming we need to use the
> KeyUp event, does anyone 
> > have any ideas how to get around it?
> > Rob Martin
> > Software Engineer
> >
> > phone +64 03 377 0495
> > fax   +64 03 377 0496
> > web www.chreos.com
> >
> > Wild Software Ltd
> >
> >
> >
> > Phil Middlemiss wrote:
> >> Is your customised component responding to the
> OnKeyUp to check for 
> >> the Enter key? If this is the case then perhaps
> the key-up message is 
> >> being transmitted to your component since the
> other screen is now 
> >> closed - although I would have thought that could
> only happen if the 
> >> other window was responding immediately to an
> OnKeyDown as opposed to 
> >> a KeyPress event. Could be worth checking.
> >>
> >> Phil.
> >>
> >> Robert martin wrote:
> >>> Hi All
> >>>
> >>> We have a customised component that pops open
> when the enter key is 
> >>> pressed.  However sometimes when an Enter key is
> pressed in another 
> >>> screen (open over the screen with our component)
> and the Enter key 
> >>> is pressed on a close button, the Enter key
> seems to travel into our 
> >>> component (which has focus after the other
> screen is closed) and pop 
> >>> it open.  This is undesirable :)
> >>>
> >>> Any suggestions?
> >>>
> >> _______________________________________________
> >> Delphi mailing list
> >> Delphi at ns3.123.co.nz
> >> http://ns3.123.co.nz/mailman/listinfo/delphi
> >>   
> > _______________________________________________
> > Delphi mailing list
> > Delphi at ns3.123.co.nz
> > http://ns3.123.co.nz/mailman/listinfo/delphi
> >
> >
> 
> -- 
> *Rohit Gupta*
> * B.E. Elec.   M.E.   Mem IEEE    Associate IEE*
> *Technical Manager*
> *Computer Fanatics Limited*
> ** 
> *Tel*     +64 9 4892280
> *Fax*    +64 9 4892290
> *Email  *rohit at cfl.co.nz <mailto:rohit at cfl.co.nz>**
> *Web    *www.cfl.co.nz <http://www.cfl.co.nz/>
>  
>
------------------------------------------------------------------------
> This email and any attachments contain information,
> which is 
> confidential and may be subject to legal privilege
> and copyright. If you 
> are not the intended recipient, you must not use,
> distribute or copy 
> this email or attachments. If you have received this
> in error, please 
> notify us immediately by return email and then
> delete this email and any 
> attachments.
> > _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 


Send instant messages to your online friends http://au.messenger.yahoo.com 


More information about the Delphi mailing list