Imports System.IO
Imports System.Windows.Forms
public class PageSetupDialogSettings
public Shared Sub Main
Dim PrintDB As New PrintDialog()
PrintDB.Document = New System.Drawing.Printing.PrintDocument()
If (PrintDB.ShowDialog() = DialogResult.OK) Then
Console.WriteLine("Printer: " & PrintDB.PrinterSettings.PrinterName)
Console.WriteLine("From Page: " & PrintDB.PrinterSettings.FromPage)
Console.WriteLine("To Page: " & PrintDB.PrinterSettings.ToPage)
Console.WriteLine("Print Range: " & PrintDB.PrinterSettings.PrintRange)
Console.WriteLine("Copies: " & PrintDB.PrinterSettings.Copies)
If (PrintDB.PrinterSettings.LandscapeAngle = 90) Then
Console.WriteLine("Landscape")
Else
Console.WriteLine("Portrait")
End If
Console.WriteLine("Allow Print to File: " & PrintDB.AllowPrintToFile)
Console.WriteLine("AllowSelection: " & PrintDB.AllowSelection)
Console.WriteLine("Allow Some Pages: " & PrintDB.AllowSomePages)
Console.WriteLine("Print to File: " & PrintDB.PrintToFile)
Console.WriteLine("Show Network: " & PrintDB.ShowNetwork)
End If
End Sub
End class