The lost ENTER key...

G

Guest

I have put up a previous post about this issue, but since I can't seem to
re-product the problem in any kind of simple example, no one has been able to
help. The basic problem is this: I have a user control, it handles the
KeyPress event, looks for the Enter Key, and does something. It works fine
most of the time. In my application, If the form it is on looses focus, then
you return to the form, the key press event is not called if the key that
was pressed was the enter key. (There is NO accept button on the form; The
AccpetsEnterKey is set to true; KeyPreview on the form is false)

Anyway, since we can't fix the REAL problem, I need a work around. Is there
any way to capture the keypress event on a deeper level than the form? (I
tried adding an event handler to the .findform of the control, but that does
not work either.) Is there some kind of SYSTEM event I can latch on to?

Thanks.

--Zorpy
 
D

Darious Snell

Very odd. Although, I have experienced this kind of problem using a numeric up/down.
Anyway, you could play around with global hooks.

Here is a link to some c# classes. Search around for vb.net implementations or just add
some of the c#
classes to your solution.

Sorry I can't help more. GL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top