Mouse movement from hidden form

J

John

Hi all:

I have an application that hides itself and displays an icon in the system
tray. Is it possible for this application to detect keystrokes and/or mouse
movements while hidden/minimized. So the application is not loaded and
visible, so mouse movements on the form won't work, I need the program to be
able to detect mouse movement on the system level.

Thanks in advance.

John.
 
K

Kevin Yu [MSFT]

Hi John,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need your program detect mouse
movement on the system level. If there is any misunderstanding, please feel
free to let me know.

Based on my experience, we cannot do this with any managed classes. So we
have to call API and use hook to achieve this. Here I have found an article
about managing low-level keyboard hooks in VB .NET. It has provided us with
a good example and source code. You can try to make some changes to it and
I think it will work. Here is the link:

http://www.developer.com/net/net/article.php/11087_2193301_1

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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