Connecting Tech Pros Worldwide Forums | Help | Site Map

The lost ENTER key...

Zorpiedoman
Guest
 
Posts: n/a
#1: Nov 21 '05
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

Darious Snell
Guest
 
Posts: n/a
#2: Nov 21 '05

re: The lost ENTER key...


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


"Zorpiedoman" <nowheremane@beatles.com> wrote in message
news:0632D8B7-D869-478E-844D-55AFBCD61E27@microsoft.com...[color=blue]
> 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[/color]


Zorpiedoman
Guest
 
Posts: n/a
#3: Nov 21 '05

re: The lost ENTER key...


Darious - you could do my one more small favor...

send me the link! :-)

Thanks... zorpy

"Darious Snell" wrote:
[color=blue]
> 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
>
>
> "Zorpiedoman" <nowheremane@beatles.com> wrote in message
> news:0632D8B7-D869-478E-844D-55AFBCD61E27@microsoft.com...[color=green]
> > 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[/color]
>
>
>[/color]
Closed Thread


Similar Visual Basic .NET bytes