How to Capture Screen Information in Windows

Introduction:
This document describes how to capture basic Windows screen information and how to save that information. The two types of information addressed are DOS text and graphics (active window and full screen) captures.

Scope:
Topics discussed are:


Fundamental Concepts

The first fundamental concept is to remember to try not to reinvent the wheel. :)

I just spent about four hours writing a rather extended treatise about fundamental Copy/Pasting concepts, complete with analogies, alliteration, amusements and was about to embark on an allegory when it struck me that maybe, just maybe, somebody else had written about the subject with somewhat more directness and clarity and that it was available on the web.

Well, duh, of course they have, there's only about five million web pages that contain the words "cut copy paste" (not kidding, look for yourself).

So in a fit of pique, I deleted all that self-serving stuff and started over. (Okay, not really... in fact, I copy/pasted it elsewhere. I hardly ever throw anything away.)

Browsing through the list, I grew a bit restless after glancing through the first thousand pages or so and decided that these links were okay. In approximately ascending order of abstraction, they are:

In a nutshell, you need to understand only three concepts:
* How to select data
* How to copy data
* How to paste data

What is a bit more difficult to find on the web is a simple description for getting text out of a DOS window and how to do screen captures, both in one place. That is what this page is about. The following sections deal with the mechanics of selecting, copying and pasting for these two slightly arcane subjects.


DOS Text Capturing

(To skip the discussion, click here to go straight to the mechanics.)

While XP technically does not have DOS (it has a command shell, or a command line interpreter), for the purposes of this discussion and for the sake of simplicity, I will refer to it as a DOS window or screen

Let's say you have a DOS screen of text data that you really need to save such as Fig. 1:


Figure 1

Well, you could do a screen cap of that window, but a bitmap (bmp) file is going to run over 1300 Kbytes, a jpeg file will cost about 140 Kbytes, and even a spiffy png file will be over 25 Kbytes.

Now, I don't know about you, but this offends my tender sensibilities; in fact it almost outrages me because in fact that darn screen only contains 2136 bytes of text data and it's the text that I need to capture, not a pretty picture of it.

We want to copy this text into a Notepad file. How?


While the principles are the same, the mechanics of the selection and copy depends on if you're using Win98/98SE/ME or if you're using XP. Win2000 behaves largely the same as XP; differences will be noted. (I'm not certain where WinNT falls into this paradigm, perhaps someone can help me out there.)

Unlike Notepad, Wordpad, Word, and other GUI based "text" interfaces which permit (well, force) the "wrapping" of contiguous text selection (Fig. 2):


Figure 2

DOS Text selection (which is called, "Marking") is always done as a simple rectangle and in Win98/ME you cannot exceed the boundaries of the visible DOS screen (Fig. 3):


Figure 3


In both Win98/ME and WinXP, everything can be found in the upper left corner of the window. Win98/ME had nice toolbar buttons from which to select Mark, Copy, or Paste (see Fig 4a). (If the toolbar is not visible in the Win98/ME DOS window, click here for instructions to enable it.)

WinXP hides these functions behind the "cmd" icon immediately to the left of the words "Command Prompt" in the title bar (see Fig 4b).

However, there are shortcuts available to make life a little simpler.


Figure 4a
Win98/98SE/ME DOS screen, top left corner

Figure 4b
WinXP cmd ("DOS") screen, top left corner
The Mechanics of capturing text from a DOS screen

Action Win98/98SE/ME WinXP/2K
Enable
Marking
Three methods, use one:
a) click the toolbar "Mark" button
b) rightclick in the DOS window and click on "Mark"
c) click on DOS icon in title bar, move to "Edit", click on "Mark"
Two methods, use one:
a) rightclick in the DOS window and click on "Mark" (Not W2K)
b) click on DOS icon in title bar, move to "Edit", click on "Mark"
Mark
(select)
Text
Four discrete steps; in order:
1) position cursor over one corner of the text to save
2) press and hold down left mouse button
3) drag cursor to opposite diagonal corner of text to save
4) release mouse button
Four discrete steps; in order:
1) position cursor over one corner of the text to save
2) press and hold down left mouse button
3) drag cursor to opposite diagonal corner of text to save
4) release mouse button
Mark All Not available in Win98/ME To combine the above two steps into one step and to select all of the DOS text in the DOS buffer (as far as you can scroll up), there are:

Three discrete steps; in order:
1) For WinXP only: rightclick in the DOS window
or
1) click on DOS icon in title bar, move to "Edit"
2) Click on "Select All"
3) rightclick anywhere in the DOS window

Copy
Text
Four methods, use one:
a) press the Enter (Return) key
b) rightclick anywhere in the DOS window
c) click the toolbar "Copy" button
d) click on DOS icon in title bar, move to "Edit", click on "Copy"
Three methods, use one:
a) press the Enter (Return) key
b) rightclick anywhere in the DOS window
c) click on DOS icon in title bar, move to "Edit", click on "Copy"
Paste
Text
Three discrete steps; in order:
1) Open the window of the program you want to paste into
2) Position the cursor where you want to paste the text

3) Then there are several methods to paste, use one:
a) Press Control-V
b) Press Shift-Insert
c) Click menu item Edit then click Paste
d) Click the Paste toolbar button if available

Three discrete steps; in order:
1) Open the window of the program you want to paste into
2) Position the cursor where you want to paste the text

3) Then there are several methods to paste, use one:
a) Press Control-V
b) Press Shift-Insert
c) Click menu item Edit then click Paste
d) Click the Paste toolbar button if available


Graphics Capturing and SAVING

Capturing (copying to the Clipboard) either the entire screen or an individual window is much simpler than capturing text. It is so simple that I can state both methods in two lines:

1) Press 'PrintScrn' key on the keyboard to capture the entire screen
2) Press 'Alt-PrintScrn' to capture only the currently active window.

There is one thing to be careful of when using Alt-PrintScrn to capture the active window. Any portion of the window which is off-screen will not get captured, so make sure that the entire window is within the confines of the display screen.

So what's the big deal? Well, so now what are you going to do with that bitmapped image which is merrily sitting in your Clipboard? Bitmapped? What bitmapped?

(If you know what bitmap files are and how to paste them into an editing program and how to save them as something other than bitmap files [preferably .png], then you're done with this section. If you want, skip to the next section.)

Yeah, there's the rub. The PrintScrn or Alt-PrintScrn capture saves the data as a bitmapped image. Now for those of you unfamiliar with the concept, a bitmapped image requires three bytes (one byte each for red, green and blue) for every pixel (plus a little overhead).

So, if your display is running at 1024x768 resolution (very common), that means that the image which is saved is 786,432 pixels or a little over 2,359,296 bytes.

That's a hungry meal and a half, particularly if you want to send that image as an email attachment over a dialup connection (Figure over an hour and a half by the time you account for the MIME encoding.. at least 100 minutes under the best of conditions).

Therefore, we're going to concentrate mostly on what to do with the image after you've captured it. Images of screens or windows for illustrative or troubleshooting purposes are often called "screencaps" or "screenshots" or "captures" or any of a dozen of other expressions; but they all refer to the acquistion of that image you're seeing on the screen.

(If you don't know how to save the image but want to forego the soapbox, you can skip ahead to the mechanics.)


Essentially, you have to paste that image into a program which can handle graphics, but which program?

Historically, folks often like to paste their images into a Word document (.doc) file. I don't mean to offend, but this is really not the best of choices for several reasons. Off the top of my head:

  • Some of those "other" operating systems don't like .doc files
  • Word converts the bitmapped image into a .wmf (Windows MetaFile) format
  • Unless the wmf image is resized to precisely the same dimensions as the original image from which it was taken, the image becomes distorted, often to the point of unreadability
  • Requires a Word-compatible word processing program to view
  • The compression ration is poor
  • Security concerns

So what other options are there? There are many image processing programs available. To name a few without endorsing any, examples are:

  • Adobe Photoshop
  • PaintShop Pro
  • Picture Publisher
  • ThumbsPlus
These are a very few of the programs available which allow you to paste an image from the clipboard into an image file then save it in any of several formats.

However, there is one program that comes with every Windows machine and is, therefore, free. It's called Paint. It's not the greatest program in the world, but then there really isn't any greatest program in the world. It is a simple image editor with emphasis upon creating simple graphics, adding text to images and other rudimentary tasks. It's great for dealing with bitmapped file data though.

Furthermore, you can save the image files in formats other than bitmapped. Available formats to save files from Paint are .bmp, .jpg, .gif, and .tiff, and WinXP adds the .png format to the list. (Saving to .png format is not supported in native versions of win9x/Me Paint. Most other modern image processing programs support the .png format.)

For most program screen captures, .png format is usually the best choice in terms of legibility and file size reduction. It is lossless and free of royalty concerns. It is supported by practically all 21st century browsers and imaging programs.

For example, Paint converted the full-screen bitmapped example I started this section off with from 2,359,360 bytes to 231,401 bytes, a little over a ten-fold reduction in file size with no information loss. My old ThumbsPlus (v3.31-R circa 1998) image viewer reduced that same bitmap file to 160,877 bytes, well over fourteen-fold reduction in file size, again, no loss.

The Mechanics of saving an image using Windows Paint

It is well beyond the scope of this page to try to describe the use of even a few image editing programs. However, the principles involved are common to most programs. This section describes a rudimentary use of Paint.

Let's assume you already have an image stored in the Clipboard. The next thing you need to do is start Paint. Historically it has always resided in the same place:

Click the Start button and go to Programs then Accessories then click on Paint.


Figure 5
Windows Paint

Then there are four methods to paste the image into Paint, use one:
a) Press Control-V
b) Press Shift-Insert
c) rightclick in the work area and click Paste
d) Click menu item Edit then click Paste


Figure 6
Paint with an image pasted in

(You'll note that Figure 6 shows some sloppiness in the pasting, such as that white section to the right of the captured image. That, and how to deal with it, will be discussed in the next section.)

Now you have to Save the captured image as a file; it's not really yours until it's saved.

Click on File then Save. Because the file is not yet named, this will open a "Save As" dialog box as shown in Figure 7:


Figure 7
Initial Save As dialog box

As with saving any sort of file, there are three sections you need to pay particular attention to, as highlighted in Figure 8:

  1. Save in:
  2. File name:
  3. Save as type:

Figure 8
Useful Save As dialog box

"Save in:" refers to the directory (or folder) in which the file will be saved. If you don't know where the file is being saved, how are you going to find it later? You can click the dropdown button to browse to an appropriate directory to save in, or even the Desktop.

"File name:" refers to the name of the file which will be saved. If you don't know the name of the file, again, how will you find it? Giving the file a descriptive and meaningful name just can't be overemphasized. Calling a file "yay" might amuse you, but I can just about guarantee that if you look at that filename in a month or two, you won't have a clue what it is. When in doubt, let the concept of descriptive clarity prevail. So enter a useful and descriptive filename in the field.

"Save as type:" refers to the format in which the file will be saved. This is where you tell Paint to convert the data into a more useful and compact format. The default "type" or format for Paint is bitmapped. You will usually have to click the dropdown button and select PNG.

Then click the "Save" button.

Bam. You've created a screencap. That's it. After you've done it a couple times, it will be second nature.


Practical and Other Considerations

This section is for a few observations that didn't really seem to fit well into the procedures above.


DOS window adjustments

The DOS window can be tweaked by clicking on the icon in the upper left corner of the title bar and clicking on "Properties" (see Figure 4b).

If the Win98/Me Toolbar buttons are not visible, enable them by clicking on the "Screen" tab and put a check in the "Display Toolbar" checkbox. (No, there is no such animal in XP. Sorry.) See Figure 9.

In Windows, the DOS screen defaults to 25 lines tall for historic reasons. Is this too small? Probably. You can make it larger (Click here for how to change this in XP). In WinME, open the Properties as described above, click on the "Screen" tab and adjustng the "Initial size" value as desired. See Figure 9.


Figure 9
Win98/ME DOS window Properties

The Win98/ME DOS window does not permit scrolling, and the maximum number of lines is 50. Be careful if your display is at a low resolution, though: the bottom of the window can fall off the bottom of the screen and you'll be unable to see it or what commands you're entering.

The WinXP DOS window offers a bit more flexiblility. Click on the icon to the far left of the the title bar and click on Properties. Click on the "Layout" tab. See Figure 10 below.


Figure 10
WinXP DOS window Properties

The "Screen Buffer Size" section dictates how much information is stored in memory and is therefore retrievable by scrolling back up. This buffer size determines the amount of text information which is saved when using the "Mark All" ("Select All") method described above.

The "Screen Window Size" section sets the actual, visible size of the window. As before, be careful not to set the height too tall as the bottom of the window can fall off the bottom of the screen and become invisible and pretty much useless.

The "Window Position" is in number of pixes from the Left and Top edges of the entire screen.


Miscellaneous DOS Text Observations

Text captured from a DOS window has trailing whitespace truncated and each line ends in a carriage-return/linefeed pair (ASCII codes: 13h 0Ah). A line with no characters consists of only the CRLF pair.

Pasting text is almost always best done into Notepad or into a text-only (not rich-text or HTML format) email. RTF and HTML usually use proportional fonts; DOS text-based information is often set up in columns which are defined by using space characters, and the columnar formatting is largely lost when a proportional font is used.

Text can be pasted into a DOS command line using the Paste function in a similar manner as the Copy function is described above. This can be handy when entering complicated strings of characters copied from a web page, for example.

Formatted text (HTML, RTF, etc) loses its formatting when pasted into a DOS window.

Other DOS type programs such as ZTree can also have text copied from them using the methods described for DOS windows. However, sometimes they will exhibit odd "marked" area behaviour particularly if they use bright colors (8-F) or old style IBM ASCII line "graphics". The "marked" area may blink or turn inverse colors, or appear to be only partially marked. The area as physically "marked" will be saved correctly however (or at least that's been my experience).


Tidying Up Screencaps with Paint

When the Windows Paint program starts, the blank work area starts using the dimensions which were used the last time the program closed. If you paste an image which is larger than the blank work area, Paint will automatically increase the dimensions of the work area to fit the pasted image.

If you paste an image which has one or both dimensions smaller than the work area, then you will have some extra unused space off to the right and/or bottom. If you save the file as it is, that extra white space will also be saved with the image.

The right and bottom edges can be resized most easily by carefully dragging the resizing dots. The resizing dots are eight tiny blue or blue/white dots at the corners and at the centers of the edges. In Figure 11, they are circled in green.


Figure 11
Paint with resize dots circled

The first thing which will strike you is that you can barely see them. The next thing which will impress you is just how bloody difficult it is to put the cursor on them so that the cursor turns to a double-headed arrow indicating that you can resize/move them. Not much to do about that but be slow and careful.

When the cursor turns to a double-headed arrow, hold down the left button of the mouse and move the edge to the desired position. It helps a lot to zoom in first. You can do that by pressing Cntrl-PgDn. Zoom out with Cntrl-PgUp. It just takes a little practice.


Figure 12
Paint with resized work area

In the example of Figure 11 where there is only a little extra work space showing, it's usually not worth the hassle of fixing it up. However, there have been times when I had been working on a very large image (2000x3000 pixels) and that is definitely the sort of time to trim up the edges if not for aesthetics then just to make the file smaller.

There's another way of changing the dimensions of the work area. If you click on the menu item "Image" then "Attributes", it shows the size of the width and height. As you move the cursor through the work area, the coordinates are displayed in the status bar at the bottom (See Figure 13).

So you can find the coordinates of where you want the bottom right corner to be (the coordinates are always X,Y = width,height; where 0,0 is the top left corner pixel of the work area; since the top left corner is 0,0, you need to add 1 to the value of the coordinates ), and then enter those coordinates (plus 1) into those fields as shown in Figure 14.


Figure 13
Paint X,Y coordinates


Figure 14
Paint > Image > Attributes

Fortunately, I never make mistackes... ahem. However, for those that do, Paint provides an Undo function that lets you go back three changes. Easiest way to Undo is to press Cntrl-Z.


Closing

For what it's worth, all of the screencaps on this page were saved using either Paint or ThumbsPlus, and all of the screencap refinements (green circles, red ovals, inserted text and and lines, what have you) were done solely with Paint. It got a little confusing using Paint to work on images of Paint, but I think I got it right. :)

This is a first draft. Observations and corrections are welcomed. This wasn't meant to be an end-all, final word, definitive exposition on everything that can be done regarding DOS text capturing and/or screencaps, so a great many subtleties were intentionally left unaddressed.

It's meant merely to point folks in the right direction. You'll learn way more by fiddling around with this stuff on your own than you did by reading this.

Mail can be sent to .
The email address is in an image to deter the casual spambot-crawler. My apologies in advance for the inconvenience to real people.

John



Return to Mentors' Page

This page updated 0226PDT, April 02 2007