Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: Microsoft Visual Basic 6 : Printing
Description: Print using the Windows API and native VB6 commands

Class: CAPIPrinter

Working with the printer using the Windows API

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CAPIPrinter class
CurrentX Property Gets the current x position of printer drawing.
CurrentY Property Gets the current y position of printer drawing.
Font Property Gets the font used for printing text
hDC Property Sets the device context of the printer. This property must be set before any drawing code is called.
Height Property Gets the height of the printer drawing surface.
PrintJobID Property Gets the ID of the current print job. This property is only valid after the StartDoc method has been called.
Width Property Gets the width of the printer drawing surface.
Class_Initialize Initialize Set initial values to defaults which may be overridden with property settings
Class_Terminate Terminate Make sure the print job is finished
DrawLine Method Draws a line
DrawPicture Method Draws a picture. If the optional parameters lngWidth and lngHeight are not specified, this procedure scales the bitmap to the printer.
DrawText Method Draws text
EndDoc Method Ends a print job
EndPage Method Finish printing a page
GetTextHeight Method Get the height of the text
GetTextWidth Method Returns the width of the text. The font height is measured in logical device units. Most windows API functions for dealing with fonts require the font height in logical units. This function only works correctly in the MM_TEXT mapping mode.
PointsToHeight Private Converts a font point SIZEAPI to a font height. The font height is measured in logical device units. Most windows API functions for dealing with fonts require the font height in logical units. This function only works correctly in the MM_TEXT mapping mode.
ScaleX Method Converts x units between the screen and printer
ScaleY Method Converts y units between the screen and printer
StartDoc Method Begins a print job
StartPage Method Prepares the printer for a new page

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence