How does the draggable crosshair in Process Explorer work?
-
23-08-2019 - |
Question
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?
Solution
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow