PrintDocument.PrinterSettings.PrintRange : PrintDocument « System.Drawing.Printing « VB.Net by API






PrintDocument.PrinterSettings.PrintRange

  


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

   
    
  








Related examples in the same category

1.PrintDocument.PrintPage
2.PrintDocument.PrinterSettings
3.PrintDocument.PrinterSettings.Copies
4.PrintDocument.PrinterSettings.FromPage
5.PrintDocument.PrinterSettings.PrinterName
6.PrintDocument.PrinterSettings.ToPage