PrintJob.PrinterResolutionY Property

Gets the print job's printer resolution in the Y axis (vertical).

[Visual Basic]
Public ReadOnly Property PrinterResolutionY As Integer
[C#]
public int PrinterResolutionY {get;}
[C++]
public: __property int get_PrinterResolutionY();
[JScript]
public function get PrinterResolutionY() : int;

Property Value

Gets the print job's printer resolution in the Y axis (vertical). This value is in dots per inch.

Remarks

This value is only sensible if the print job PrinterResolutionKind is Custom

Example

[Visual Basic] The following example prints the resolution of a job to a trace when a job is added to the queue being monitored

[Visual Basic] 
Private mPr As PrinterMonitorComponent

Public Sub StartWatching(ByVal PrinterDeviceName As String)

   mPr = New PrinterMonitorComponent()

   '\\ For efficieny reasons, do not monitor printer information changed events
   mPr.MonitorPrinterChangeEvent = False

   AddHandler mPr.JobAdded, AddressOf Addedtest

   mPr.ThreadTimeout = -1
   mPr.DeviceName = PrinterDeviceName 
   
   
End Sub

Public Sub Addedtest(ByVal sender As Object, ByVal e As EventArgs)

   With CType(e, PrintJobEventArgs).PrintJob
        Trace.WriteLine("** Document: " & .Document)
        Trace.WriteLine("** Printer Resolution: " & .PrinterResolutionKind.ToString)
        Trace.WriteLine("** Printer Vertical Resolution: " & .PrinterResolutionY.ToString)
        Trace.WriteLine("** Printer Horizontal Resolution: " & .PrinterResolutionX.ToString)
   End With

End Sub

Requirements

Namespace: PrinterQueueWatch

Platforms:  Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

See Also

PrintJob overview , All PrintJob members


© 2003 Merrion Computing Ltd. All rights reserved.