The Printing Dialog Boxes

Team Fly 

Page 164

IsPlotter A True/False value indicating whether the printer is a plotter.

IsValid A True/False value indicating whether the PrinterName corresponds to a valid printer.

LandscapeAngle Returns an angle, in degrees, by which the portrait orientation must be rotated to produce the landscape orientation.

MaximumCopies Returns the maximum number of copies that the printer allows you to print at a time.

MaximumPage, MinimumPage Two properties that return or set the largest and smallest values the FromPage and ToPage properties can have. Set these two properties if you want users to select a range of pages on the PageSetup dialog box.

PaperSizes Returns all the paper sizes that are supported by the selected printer.

PaperSources Returns all the paper source trays on the selected printer.

PrinterName Returns or sets the name of the printer to use.

PrinterResolutions Returns all the resolutions that are supported by the selected printer. This PrinterResolutions property is a collection of PrinterResolution objects and its members are read-only.

PrintRange Determines the options available to the user on the Page Setup dialog box for selecting the range of pages to be printed. This property can be set to one of the members of the PrintPage enumeration (AllPages, Selection, or SomePages) and it determines which of the page selection options will be enabled on the Page Setup dialog box. Read the value of this property to find out the type of selection made by the user on the Page Setup dialog box. If the user has selected a range of pages, use the FromPage/ToPage properties to find out the numbers of the starting and ending pages.

SupportsColor Returns a True/False value indicating whether the selected printer supports color printing.

CreateMeasurementGraphics Returns a Graphics object that represents the page's drawing surface. We use this object to calculate the dimensions of text when rendered on the printer with a specific font.

The Printing Dialog Boxes

In addition to the PrintDocument control, there are three more printing controls, which are visible at runtime as dialog boxes: the Page Setup dialog box, the Print dialog box, and the Print Preview dialog box. The PageSetupDialog control displays the Page Setup dialog box, shown in Figure 7.2, which allows users to set up the page (its orientation and margins). This dialog box returns the current page settings in a PageSettings object. The settings specified by the user on the Page Setup dialog must be taken into consideration by your application to produce a printout limited within the page's margins, with the proper orientation, and so on. As you can see, there aren't many parameters to set on this dialog box, but you should display it and take into account the settings specified by the user.

Team Fly 


Visual Basic  .NET Power Tools
Visual Basic .NET Power Tools
ISBN: 0782142427
EAN: 2147483647
Year: 2003
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net