Microsoft Visual Basic Printer Objects


ColorMode:

If 1 (or if set to the vbPRCMMonochrome named literal), output prints in monochrome (shades of white and black) even if you use a color printer. If 2 (or if set to the vbPRCMColor named literal), output prints in color.

 

Copies:

Specifies the number of copies to print.

 

CurrentX:

Holds the horizontal print column, from the upper-left corner of the page, measured either in twips or the scale defined by the ScaleMode properties.

 

CurrentY:

Holds the vertical print row, from the upper-left corner of the page, measured either in twips or the scale defined by ScaleMode properties.

 

DeviceName:

The name of the output device, such as a printer driver, to which you want to print.

 

DrawMode:

Determines the appearance of graphics that you draw on the printer.

 

DrawStyle:

Specifies the style of any graphical lines that your application draws.

 

DrawWidth:

Specifies the width of lines drawn, from 1 (the default) to 32767 pixels.

 

DriverName:

The name of the printer driver (do not specify the driver's extension).

 

Duplex:

If 1 (or if set to the named literal vbPRDPSimplex), printing will occur on one side of the page. If 2 (or if set to the named literal vbPRDPHorizontal), printing will occur on both sides (if your printer supports double-sided printing) using a horizontal page turn. If 3 (or if set to the named literal vbPRDPVertical), printing will occur on both sides (if your printer supports double-sided printing) using a vertical page turn.

 

FillColor:

Specifies the color of printed shapes. Determines the shading density for noncolor printed output.

 

FillStyle:

Contains the style pattern of printed shapes.

 

Font:

Returns a font that you can use for setting font attributes.

 

FontBold:

Contains either True or False to determine whether subsequent printed output will be boldfaced.

 

Orientation:

If 1 (or if set to the named literal vbPRORPortrait), output prints in portrait mode (printing occurs down the page). If 2 (or if set to the named literal vbPRORLandscape), output prints in landscape mode (printing occurs across the page).



FillColor:

Specifies the color of printed shapes. Determines the shading density for noncolor printed output.

 

FillStyle:

Contains the style pattern of printed shapes.

 

Font:

Returns a font that you can use for setting font attributes.

 

FontBold:

Contains either True or False to determine whether subsequent printed output will be boldfaced.

 

FontCount:

Specifies the current printer's number of installed fonts.

 

FontItalic:

Holds either True or False to determine whether subsequent output will be italicized.

 

FontName:

Holds the name of the current font being used for output.

 

Fonts:

Contains a table of values that act as if they were stored in a control array. Fonts(0) to Fonts (FontCount-1) holds the names of all installed fonts on the target computer.

 

FontSize:

Holds the size, in points, of the current font.

 

FontStrike:

Thru Holds either True or False to determine whether subsequent output will be printed with a strikethrough line.

 

FontTransparent:

Holds either True or False to determine whether subsequent output will be transparent.

 

FontUnderline:

Holds either True or False to determine whether subsequent output will be underlined.

 

ForeColor:

Specifies the foreground color of printed text and graphics. (The paper determines the background color.)

 

hDC:

A Windows device context handle for advanced Windows procedure calls.

 

Height:

Holds the height, in twips, of the current printed page.

 

Methods 

 

By far the most widely used Printer object methods are the Print, EndDoc, and NewPage methods.    Once you master these three methods, you'll rarely need to use any other methods.