0

Is there anyway to find what kind of window is opened on the desktop in real time? It may need C# or C++. What I have found right now is to use C# Process.GetProcesses() method to find the opened windows on desktop.

But the output cannot be changed when the users have opened any new windows. So, is there any method I can use to track the opening windows in real time?

Also, is there any way to track the mouse movement on a specific window by using our web service?

Many many thanks!

Cherry Wu
  • 3,844
  • 9
  • 43
  • 63
  • 1
    You want to track mouse movement on a window other than your own application? This sounds pretty sketchy. – tnw Apr 29 '13 at 17:35
  • Also, have you tried [something like this](http://stackoverflow.com/questions/7268302/get-the-names-of-all-open-windows-not-process-name)? That solution gets you the titles of all current open windows. You say the output doesn't change when new windows are opened -- you probably just need to call `GetProcesses` again. – tnw Apr 29 '13 at 17:37

2 Answers2

0

I do agree with tnw that this sounds sketchy (possibly an example would be useful to help here). However, you want to look at the windows api calls:

The first will only give you the current window, and not all open windows, but it sounds like this is what you really want anyway?

Justin Pihony
  • 66,056
  • 18
  • 147
  • 180
0

Source code to Windows keystroke logger that does this (in C++): http://16s.us/16k/

Edit: It shows the open window the user is typing in (in real time), but not all open Windows, only the active window in use.

  • OK I was about to yell at you for passing out something like that -- but seeing your edit this seems fair enough. – tnw Apr 29 '13 at 17:56
  • @tnw - Read the page and the source code, I wrote it. It's harmless. –  Apr 29 '13 at 17:58
  • @BradTilley hello Brad, yes I just need the open window that the user is typing in. When I tried to use MIGW3 to compile your code (by using "g++ 16k.cpp -o 16k.exe"), it shows fatal error: boost/date_time/posix_time/posix_time.hpp: No such file or directory. I have also tried to use Visual Studio to compile your code, still failed. Do you know what can I do? Many many thanks! – Cherry Wu Apr 30 '13 at 01:03