Environment.PageSetup Method
Public Function PageSetup( _
Optional ByVal allowMargins As Boolean = false, _
Optional ByVal showDialog As Boolean = true, _
Optional ByVal defaultMargins As Nullable(Of Integer) = null, _
Optional ByVal paperSize As PaperSize = null, _
Optional ByVal landscape As Nullable(Of Boolean) = null _
) As Boolean
This language is not supported or no code example is available.
Parameters
- allowMargins
- bool
When true, the margins section of the dialog box is enabled.
- showDialog
- bool
When true, the PageSetup dialog is shown.
The default margins
- paperSize
- PaperSize
The paper size
The orientation mode
Return Value
boolTrue if the user has confirmed the settings.
PrinterSettings printerSettings = new PrinterSettings(); IEnumerable<PaperSize> paperSizes = printerSettings.PaperSizes.Cast<PaperSize>(); PaperSize sizeA4 = paperSizes.FirstOrDefault<PaperSize>(size => size.Kind == PaperKind.A4);
This language is not supported or no code example is available.
Dim printerSettings As PrinterSettings = New PrinterSettings() Dim paperSizes As IEnumerable(Of PaperSize) = printerSettings.PaperSizes.Cast(Of PaperSize)() Dim sizeA4 As PaperSize = paperSizes.FirstOrDefault(Of PaperSize)(Function(size) size.Kind = PaperKind.A4)
This language is not supported or no code example is available.