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 !
Yup. Sux but understandable (?). I have actually re written (T=this
morning) the component to move the code out of KeyUp and back into
KeyPress. It was just getting to difficult to trap the issue and re
writing the code turned out to be the easier / better option.
All Praise Bill ;-)
Rob
We can override OnKeyXXX event and ...
if Key = VK_RETURN then
begin
// Call something...
Key := 0; // eat Key here
end;
--- Rohit Gupta [EMAIL PROTECTED] wrote:
If a receiving form closes on a keydown then the
next form can receive
the keyup (depending on timing and OS and dlls
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
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
Perhaps it is a bug - it could occur if the message handler for the
control was not setting the result of the message to 1. Then again, that
might be a feature!
To fix it, you could use a flag that was set when the OnKeyDown event
fired, and reset it when the OnKeyUp event fired. Otherwise
Hi thanks Phil
The funny thing is I was just about to write that I had solved it using
the exact same method you describe when your email arrived ! Great
minds think alike (although I don't really like it as a solution).
Cheers
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64