Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Screen Capture given application and window coords

Posted on 2006-03-26
3
Medium Priority
?
215 Views
Last Modified: 2010-04-07
Hi All,

I know that there are questions similar to this, but I'm in a hurry to get some code working with as little change/editing of the code

Basically a function that captures the screen area (of which the dimensions need to be specified) of a given application and save the image.

What am I trying to do?

Example: Using MS Word, but I only want to capture the text, not the whole window.

I'll award max points to a working example.

Cheers,

Sean

0
Comment
Question by:nzfire
3 Comments
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 1000 total points
ID: 16297443
Microsoft has a great project in their Knowledge Base that does screenshots via API's only...

The routines in the example can:

Capture the entire contents of a form.
Capture the client area of a form.
Capture the entire screen.
Capture the active window on the screen.
Capture any portion of any window given a handle to it.
Create a Picture object from a bitmap and a palette.
Print a Picture object as large as possible on the page.

It can be found here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;161299&Product=vb6

To save the captured area, use the SavePicture() function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vb98/html/vbstmsavepicture.asp

~IM
0
 
LVL 9

Accepted Solution

by:
Naveen Swamy earned 1000 total points
ID: 16297707
0
 
LVL 1

Author Comment

by:nzfire
ID: 16316300
Hi guys,

Thanks for the reply. As I used bits and pieces from both posts, I have split the points.

Cheers
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question