Microsoft KB Archive/35303

{|
 * width="100%"|

Using PRINT SCREEN Key to Print CGA Graphics

 * }

Q35303

5.00 5.10 6.00 6.00a 6.00ax 7.00 | 1.00 MS-DOS | WINDOWS kbprg -- The information in this article applies to: - The C Run-time (CRT), included with: - Microsoft C for MS-DOS, versions 5.0, 5.1, 6.0, 6.0a, and 6.0ax - Microsoft C/C++ for MS-DOS, version 7.0 - Microsoft Visual C++ for Windows, version 1.0 -- SUMMARY ======= In Microsoft C versions 5.0, 5.1, 6.0, 6.0a, 6.0ax, C/C++ version 7.0 and Visual C++ 1.0, to print graphics generated by a C program using the PRINT SCREEN key, you must first install GRAPHICS.COM (supplied by MS-DOS). In older versions of GRAPHICS.COM, this will work only with the CGA modes. Hercules, EGA, and VGA modes do not print with this method; you must obtain a third party, public domain, or shareware program to print graphics from these modes. However, the GRAPHICS.COM that ships with MS-DOS version 5.0 supports CGA, EGA, and VGA. MORE INFORMATION ================ In the MS-DOS environment, PRINT SCREEN prints any text screen to an attached printer hooked to PRN. This function can't interpret a graphic screen to the printer because a graphic screen is defined and produced differently than a text screen. A unit of area is defined by a pixel rather than a character. (This can be noticed by the way a text screen is described &quot;80 columns by 25 rows&quot; as opposed to a graphic screen &quot;640 pixels by 200 pixels.&quot;) MS-DOS supplies a TSR (terminate-and-stay-resident) program, GRAPHICS.COM, that allows the PRINT SCREEN to interpret a graphic screen. When the GRAPHICS.COM is installed, it will interpret a CGA graphic screen to a printer attached to PRN. This utility must be installed before running a C program that draws a graphic screen in the CGA modes; that is, the program must have specified a _setvideomode to _MRES4COLOR, _MRESNOCOLOR, or _HRESBW. Any of the other video modes will require some other utility to interpret the screen for the printer. It also should be noted that GRAPHICS.COM was intended to write to an IBM Personal Graphics or IBM Personal Color Printer. It may be necessary on some other printers to set some switch settings, if available, to emulate either of these printers. The printer manual for the specific printer should be consulted in these cases. Additional reference words: kbinf 5.10 6.00 6.00a 6.00ax 7.00 1.00 prntscrn printscrn print scrn KBCategory: kbprg KBSubcategory: CRTIss GraphicsIss

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbCRT