473,322 Members | 1,408 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,322 software developers and data experts.

Capturing Windows Keys and Mouse Movements

Hi all,

Does anyone know how to capture the Windows Keys (I know
that they are out of the ascii key range) and how to
capture and record Mouse movements?

Thanks,

/Jonny
Nov 15 '05 #1
1 1966
Jonny,

If you need to do this for the entire system, then you need to set up
hooks into the system. In order to do this, you will have to call the
SetWindowsHookEx API function through the P/Invoke layer. However, if you
need to do it just for your application, then I recommend implementing the
IMessageFilter interface, and passing an instance to the static
AddMessageFilter method on the Application class. This will allow you to
process all the windows messages that go to your app before your app handles
them. You can then filter out the keyboard and mouse messages that you want
to handle.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jonny" <jo*****************@hotmail.com> wrote in message
news:07****************************@phx.gbl...
Hi all,

Does anyone know how to capture the Windows Keys (I know
that they are out of the ascii key range) and how to
capture and record Mouse movements?

Thanks,

/Jonny

Nov 15 '05 #2

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

Similar topics

3
by: Vikram Bhatia | last post by:
1. Is there an event to capture scrolling using mouse wheel in Netscape 6.x? 2. When arrow keys are used to scroll a page in Netscape 6.x, the scrolling offsets obtained using...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
12
by: Seth Bourne | last post by:
It is really painfull when migrating from Windows Application to Web Application. it's because web application has so many weakness which have the user to use 'more mouse' than 'keyboard' it self....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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)...
1
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.