Export (0) Print
Expand All

Printer Class

Provides a Printer object for use by upgraded Visual Basic 6.0 printing code.

System.Object
  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6.Printer

Namespace:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

public class Printer

The Printer type exposes the following members.

  NameDescription
Public methodPrinterInitializes a new instance of the Printer class.
Top

  NameDescription
Public propertyColorModeGets or sets a value specifying whether the output will print in color or in monochrome on a device that supports color.
Public propertyCopiesGets or sets a value that determines the number of copies to be printed.
Public propertyCurrentXGets or sets the horizontal coordinates for the next printing or drawing method.
Public propertyCurrentYGets or sets the vertical coordinates for the next printing or drawing method.
Public propertyDeviceNameGets the name of the current printer.
Public propertyDocumentNameGets or sets the document name to display (for example, in a print status dialog box or printer queue) while printing the document.
Public propertyDrawStyleGets or sets a value that determines the line style for output from graphics methods.
Public propertyDrawWidthGets or sets the line width for output from graphics methods.
Public propertyDuplexGets or sets a value that determines whether a page is printed on both sides (if the printer supports this feature).
Public propertyFillColorGets or sets the color that is used to fill in shapes created by using the Circle and Line graphics methods.
Public propertyFillStyleGets or sets the pattern used to fill shapes created by using the Circle and Line graphics methods.
Public propertyFontGets or sets a FontFamily by name.
Public propertyFontBoldGets or sets the bold font style.
Public propertyFontCountReturns the number of fonts available for the current display device or active printer.
Public propertyFontItalicGets or sets the italic font style.
Public propertyFontNameGets or sets the name of the font in which text is displayed for a printing operation.
Public propertyFontsGets all font names that are available for the current printer.
Public propertyFontSizeGets or sets the size of the font that is used for text in a run-time printing operation.
Public propertyFontStrikethruGets or sets the strikethrough font style.
Public propertyFontTransparentGets or sets a value that determines whether background graphics on a Printer object are printed behind text characters.
Public propertyFontUnderlineGets or sets the underlined font style.
Public propertyForeColorGets or sets the color in which text and graphics are printed.
Public propertyHeightGets or sets the height of a page.
Public propertyIsDefaultPrinterReturns a value that determines whether the currently selected printer is defined as the default printer in Control Panel.
Public propertyOrientationGets or sets a value indicating whether documents are printed in portrait or landscape mode.
Public propertyPageReturns the page number of the page that is currently being printed.
Public propertyPaperBinGets or sets a value indicating the default paper bin on the printer from which paper is fed during print operations.
Public propertyPaperSizeGets or sets a value indicating the paper size for the current printer.
Public propertyPrintActionGets or sets a value that determines whether the print output is directed to a printer, to a print preview window, or to a file.
Public propertyPrintFileNameGets or sets a value that specifies the file name of an Encapsulated PostScript file and the path to which the file will be saved when the PrintAction property is set to PrintToFile.
Public propertyPrintQualityGets or sets a value that indicates the printer resolution.
Public propertyRightToLeftGets or sets a Boolean value that indicates the text display direction on a right-to-left system.
Public propertyScaleHeightGets or sets the number of units for the vertical measurement of the page when you use graphics methods.
Public propertyScaleLeftGets or sets the horizontal coordinates for the left edge of the page when you are using graphics methods.
Public propertyScaleModeGets or sets a value indicating the unit of measurement for the coordinates of an object when you are using graphics methods.
Public propertyScaleTopGets or sets the vertical coordinates for the top edge of the page when you are using graphics methods.
Public propertyScaleWidthGets or sets the number of units for the horizontal measurement of the page when you use graphics methods.
Public propertyTwipsPerPixelXGets a value indicating the number of twips per pixel for an object measured horizontally.
Public propertyTwipsPerPixelYGets a value indicating the number of twips per pixel for an object measured vertically.
Public propertyWidthGets or sets the width of a page.
Top

  NameDescription
Public methodCircle(Single, Single, Single, Int32, Single, Single, Single)Prints a circle, an ellipse, or an arc on a page.
Public methodCircle(Boolean, Single, Single, Single, Int32, Single, Single, Single)Prints a circle, an ellipse, or an arc on a page, specifying whether the center point is relative to the current location.
Public methodEndDocEnds a print operation sent to the Printer object, releasing the document to the print device or spooler.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodKillDocImmediately stops the current print job.
Public methodLine(Single, Single)Prints lines on a page.
Public methodLine(Single, Single, Single, Single, Int32, Boolean, Boolean)Prints lines, squares, or rectangles on a page.
Public methodLine(Boolean, Single, Single, Boolean, Single, Single, Int32, Boolean, Boolean)Prints lines, squares, or rectangles on a page.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodNewPageStops the printing on the current page and resumes printing on a new page.
Public methodPaintPicturePrints the contents of an image file on a page.
Public methodPrintPrints text to a page.
Public methodPSet(Single, Single)Prints a single point on a page.
Public methodPSet(Single, Single, Int32)Prints a single point in a specified color on a page.
Public methodPSet(Boolean, Single, Single, Int32)Prints a single point in a specified color on a page, optionally specifying a point relative to the current coordinates.
Public methodScale()Defines the coordinate system of the Printer object.
Public methodScale(Single, Single, Single, Single)Defines the coordinate system of the Printer object.
Public methodScaleXConverts the value for the width of a page from one of the units of measure of the ScaleMode property to another.
Public methodScaleYConverts the value for the height of a page from one of the units of measure of the ScaleMode property to another.
Public methodTextHeightReturns the height of a text string as it would be printed in the current font.
Public methodTextWidthReturns the width of a text string as it would be printed in the current font.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWritePrints text to a page without adding a carriage return.
Top

The Visual Basic 6.0 Printer object has no direct equivalent in Visual Basic. The Printer object provides all the properties, methods, and events of the Visual Basic 6.0 Printer object. This enables Visual Basic 6.0 printing code to run after upgrade.

NoteNote

Functions and objects in the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft