473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Globally capturing keyboard events for a WinForm application?

I've done this before, but no longer have the code and can't remember how.
Does anyone have an example on how to globally monitor keyboard events for
an application and modify them to treat, for example, an "ENTER" event as a
"Tab" event... or something similar.
Apr 9 '08 #1
4 2815
Bill,

On Wed, 9 Apr 2008 14:47:10 -0700, "Bill Fuller" <so*****@nospam.comwrote:
>I've done this before, but no longer have the code and can't remember how.
Does anyone have an example on how to globally monitor keyboard events for
an application and modify them to treat, for example, an "ENTER" event as a
"Tab" event... or something similar.
Hmm, are you referring to the "KeyPreview" property of the form,

http://msdn2.microsoft.com/en-us/lib...eypreview.aspx

or something more drastic?

Regards,
Gilles.

Apr 9 '08 #2
"Gilles Kohl [MVP]" <no_email_available@wrote in message
news:oq********************************@4ax.com...
Bill,

On Wed, 9 Apr 2008 14:47:10 -0700, "Bill Fuller" <so*****@nospam.com>
wrote:
>>I've done this before, but no longer have the code and can't remember how.
Does anyone have an example on how to globally monitor keyboard events for
an application and modify them to treat, for example, an "ENTER" event as
a
"Tab" event... or something similar.

Hmm, are you referring to the "KeyPreview" property of the form,

http://msdn2.microsoft.com/en-us/lib...eypreview.aspx

or something more drastic?

Regards,
Gilles.
That looks familier, but I need to set this at application logon to apply to
the main from and all child forms and believe I had to do something in
particular to do this. Also, I need to be able to recognize an Enter key and
treat it as a tab key... same with the down arrow.

Kludgy, I know... but the client is insisting on this behavior.
Apr 9 '08 #3
On Wed, 9 Apr 2008 15:40:02 -0700, "Bill Fuller" <so*****@nospam.comwrote:
>"Gilles Kohl [MVP]" <no_email_available@wrote in message
news:oq********************************@4ax.com.. .
>Bill,

On Wed, 9 Apr 2008 14:47:10 -0700, "Bill Fuller" <so*****@nospam.com>
wrote:
>>>I've done this before, but no longer have the code and can't remember how.
Does anyone have an example on how to globally monitor keyboard events for
an application and modify them to treat, for example, an "ENTER" event as
a
"Tab" event... or something similar.

Hmm, are you referring to the "KeyPreview" property of the form,

http://msdn2.microsoft.com/en-us/lib...eypreview.aspx

or something more drastic?

Regards,
Gilles.

That looks familier, but I need to set this at application logon to apply to
the main from and all child forms and believe I had to do something in
particular to do this. Also, I need to be able to recognize an Enter key and
treat it as a tab key... same with the down arrow.

Kludgy, I know... but the client is insisting on this behavior.
Hmm, a quick search found this:

http://www.syncfusion.com/FAQ/winfor...46c.aspx#q905q

Maybe that's what you used?

Regards,
Gilles.

Apr 9 '08 #4

"Gilles Kohl [MVP]" <no_email_available@wrote in message
news:vv********************************@4ax.com...
On Wed, 9 Apr 2008 15:40:02 -0700, "Bill Fuller" <so*****@nospam.com>
wrote:
>>"Gilles Kohl [MVP]" <no_email_available@wrote in message
news:oq********************************@4ax.com. ..
>>Bill,

On Wed, 9 Apr 2008 14:47:10 -0700, "Bill Fuller" <so*****@nospam.com>
wrote:

I've done this before, but no longer have the code and can't remember
how.
Does anyone have an example on how to globally monitor keyboard events
for
an application and modify them to treat, for example, an "ENTER" event
as
a
"Tab" event... or something similar.
Hmm, are you referring to the "KeyPreview" property of the form,

http://msdn2.microsoft.com/en-us/lib...eypreview.aspx

or something more drastic?

Regards,
Gilles.

That looks familier, but I need to set this at application logon to apply
to
the main from and all child forms and believe I had to do something in
particular to do this. Also, I need to be able to recognize an Enter key
and
treat it as a tab key... same with the down arrow.

Kludgy, I know... but the client is insisting on this behavior.

Hmm, a quick search found this:

http://www.syncfusion.com/FAQ/winfor...46c.aspx#q905q

Maybe that's what you used?

Regards,
Gilles.
Ahhh...IMessageFilter... that was it. Thanks.
Apr 9 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: wesmanjunk | last post by:
does anyone know how to generate keyboard events in another application? like public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); can be used for mouse...
24
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C#...
3
by: Scott Meddows | last post by:
I have a group of objects that I want to be able to echo information (Console.writeline in the NEw(), Add(), etc). The objects will be used in a service and in my test application (Winform). ...
2
by: Phil Galey | last post by:
I'm using the ProcessCmdKey event to capture various keys that are pressed. However, I'm having trouble capturing the combination of the CTRL key and, say, the DOWN key. If I just press the CTRL...
3
by: MLM450 | last post by:
I have a control that handles the KeyDown event but it does not seem to execute when a combination of keys is pressed - like CTRL+Z. If I press CTRL, it executes. If I press Z, it executes. But the...
3
by: Hardy Wang | last post by:
Hi all, I am migrating a Windows Form application from .Net 1.1 to 2.0. I try to use BackgroundWorker object to handle a very lengthy process. I have a separated class to handle some very complex...
1
by: pavanjosh | last post by:
Hello All, I want to develop an application which is a banking application. I have already developed a application in .NET , C#. The major functionality of this application is automatic logging...
3
by: wbyeats | last post by:
Hi, I would like to enable my VC++ application to capture general mouse and keyboard events (click, double-click, key press) that occur outside of my application's frame (eg. clicking inside the...
9
by: Gandalf | last post by:
I use WX on windows XP and I try to generate an event when the user is clicking the keyboard while the application frame is not in focus. All I manged to do were while the application frame is in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.