Property

PrinterSetup.MaxHorizontalResolution


Warning

This item was deprecated in version 2019r2. Please use PrinterSetup.MaximumHorizontalResolution as a replacement.

Description

Set to request the maximum horizontal resolution for the printer to use.

Notes

You can change it to the maximum printer resolution you're prepared to handle or -1 for the highest possible resolution of the output device. After calling PageSetupDialog, OpenPrinter, or OpenPrinterDialog, the HorizontalResolution property will automatically be set to the highest resolution supported by the printer driver, within your specified constraints, although this may be less than what you have specified. Printing occurs at HorizontalResolution, so you should always check and use that value after setting this value.

Sample code

This example sets the MaxHorizontalResolution and MaxHorizontalResolution properties.

Dim settings As String
Dim p As PrinterSetup
p = New PrinterSetup
If p.PageSetupDialog Then
  settings = p.SetupString
End If
p.MaxHorizontalResolution = 1200
p.MaxVerticalResolution = 1200

Compatibility

All project types on all supported operating systems.