4

There is a feature in Sysinternal's Process Explorer that allows a crosshair to be dragged from the application to a control in any other application you are running and highlights said control.

Does anyone know how this was achieved or if there is a .NET/C++ library out there that can be reused?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Jason Irwin
  • 1,985
  • 2
  • 29
  • 42
  • It's the same idea as in Spy++, too, right? – lc. Apr 03 '09 at 14:41
  • As well as the info tool from AutoIt. It's funny how similar these tools look. I almost wonder if there's some code being shared around for this. – AaronLS Apr 03 '09 at 15:00

1 Answers1

4

Using Win32 API

  • GetCursorPos: to get the cursor position (maybe .NET has its own function to do that)
  • WindowFromPoint: to get the handle of the window from a specific point in the screen

more info

Aziz
  • 20,065
  • 8
  • 63
  • 69