Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ghost "Enter" keypress problem

Status
Not open for further replies.

energeticdave

Programmer
Sep 10, 2001
2
US
I can sometimes break into a keydown event and see that an ENTER has been pressed by the user, even though I KNOW I haven't pressed the key. Going up the callstack, it does NOT come from a purposefully called bit of code - it comes from the stack as if the Operating System registered the event. Also, I am not calling "keybd_event" at any time.

These will occur only while using an automation (OLE) server when exporting data from my software to Excel. It seems to occur mainly when interfering with the User Interface thread (ie when double-clicking on things in my program's worksheet - and, No, double-clicking does not lead to code that explicitly calls the keydown or keypress events of the form). Note: Double-clicking doesn't directly lead to the ENTER. The code seems to continue for a little while doing other things, and then later does the ENTER thing.

On top of all this complexity, the problem appears to be INTERMITTENT!

Any suggestions? Anyone with similar problems with other keys or mouse buttons?

Thanks,
Dave.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top