Capture image of App#A's window from App#B

F

Frederick

How can I capture (an image) of the contents of Application #A window ...
from Application #B. Let's say there are two, totally separate, independent
applications running, #A & #B. From Application #B, I want to locate
Application #A, then locate #A's currently active desktop window and capture
an image of whatever's being shown.

Application #A - I have no idea what programming method/tools were used to
create this app, but is runs in XP.

Application #B (the imager capturer) - will be written using the .NET CLR
and either C# or VB.NET in a Winforms Applications.

Any pointers or help appreciated.
 
F

Frederick

Found answers myself!

The easiest way to do this is to activate the window and to send an
Alt-PrtScr keypress event. After that you can simply read the captured image
from the clipboard. How to send a printscreen or alt-printscreen is explained
by me in this thread on EE on using SendKeys.
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_24246542.html

To find the window of a particular application, this link will help,
http://www.mycsharpcorner.com/Post.aspx?postID=32

To capture the screenshot of the whole screen or a particular are, this will
help
http://www.codeproject.com/KB/cs/TeboScreen.aspx

Once you obtain the handle to the application, find its location and
dimensions and capture the image of that area.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top