views:

49

answers:

1

Hi,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

+2  A: 

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.

Hans Passant
yes, is a good ideea. i will try that. thanks :)
andySF