pamsauto
asked on
Capture Active window in vb.net
Does anyone have or has seen an example of how to find the current active window on a desktop, find its cordinates and then screen shot it in to a bmp?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I need method #1. With the API calls you gave me I found what I needed. They were solutions you made for users already!
https://www.experts-exchange.com/questions/21504191/Finding-the-location-of-a-open-program-window-on-the-screen.html
As always Idle Mind - Thanks for your help.
https://www.experts-exchange.com/questions/21504191/Finding-the-location-of-a-open-program-window-on-the-screen.html
As always Idle Mind - Thanks for your help.
=)
(1) Use the GetForegroundWindow() API to get a handle to the active window. Use the GetWindowRect() API to get the screen coordinates. Use the BitBlt() API to copy it to an image (more APIs involved there).
(2) Press Alt-PrtScr and copy the resulting Image from the ClipBoard.
Do you have a preference in method?...