Background Handle!

145 views Asked by At

I want to make a jing like screen capture but customized for what i need and I'm stuck.

i want to take the handle of open windows that are behind my 30 alpha form if that is possible.

the handle is taken from cursor.position on global MouseMove so i can highlight with proper border windows and i like something like if(currentHandle==this.handle) currentHandle="behind window handle". i home i make my self understandably and excuse my English. Thanks

1

There are 1 answers

0
Hans Passant On BEST ANSWER

You'll need to P/Invoke GetWindow() in a loop, using GW_HWNDNEXT. Keep looping until you find a window whose GetWindowRect() contains the cursor position or you hit the desktop window. Watch out for Aero lying about window rectangles.