This method retrieves a list of supported resolutions for the printer designated by the printer name.

[Visual Basic]   [ Long = ]imagekitcontrolname.PrintDraw.EnumResolutionsVariant(XResolutions As Variant, YResolutions As Variant)
[VB.NET]   [ Integer = ]imagekitcontrolname.PrintDraw.EnumResolutionsVariant(ByRef XResolutions As Object, ByRef YResolutions As Object)
[C#.NET]   [ int = ]imagekitcontrolname.PrintDraw.EnumResolutionsVariant(ref object XResolutions, ref object YResolutions)

Parameters

Name Explanation
XResolutions An array containing the list of retrieved X resolutions
YResolutions An array containing the list of retrieved Y resolutions
* NOTE for retrieving array values:
In Visual Basic / VB.NET, if Dim XRes, then the arguments are returned in XRes.
In C#.NET the arguments are returned in ref XRes.

Return Value

Returns the number of retrieved items. Returns 0 if unsuccessful.

Explanation

The EnumResolutionsVariant method retrieves a list of supported resolutions for the printer designated by the printer name.

This method is recommended when using scripting or other languages that require variant types or when using 64 bit builds in VB.NET or C#.

If you need to know the number of elements in the array, the GetArrayNum method can be used to retrieve this. The XResolutions and YResolutions parameters contains the retrieved (horizontal and vertical) resolution values in units of dots per inch (dpi)

Also see theEnumResolutions method.

 

Sample code:

VB.NET

    Dim Ret As Integer

 

    ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C"

    Dim XResolutions As Object = Nothing

    Dim YResolutions As Object = Nothing

    Ret = ImageKit1.PrintDraw.EnumResolutionsVariant(XResolutions, YResolutions)

    If Ret < 1 Then Exit Sub

        ' various programming code

    .........

 

C#.NET

    int Ret;

    ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C";

    object XResolutions = null;

    object YResolutions = null;

    Ret = ImageKit1.PrintDraw.EnumResolutionsVariant(ref XResolutions, ref YResolutions);

    if (Ret < 1) return;

        // various programming code

    .........

 

The ImageKit10 ActiveX is a product created by Newtone Corporation