This method retrieves the number of elements in the array that will be returned when a supported item is retrieved from the printer specified by the printer name.

[C++Builder]   [ int = ]imagekitcontrolname->PrintDraw->GetArrayNum(TVIkPrinterCapability CapNo)
[Delphi]   [ Integer = ]imagekitcontrolname.PrintDraw.GetArrayNum(CapNo: TVIkPrinterCapability)

[TVIkPrinterCapability Type]

Unit
     ImageKit

type
     TVIkPrinterCapability = (vikPrinterPaperSize, vikPrinterPaperBin, vikPrinterResolution);

Parameters

Name Explanation
CapNo The type of item retrieved (vikPrinterPaperSize: Paper size, vikPrinterPaperBin: Paper tray, vikPrinterResolution: Resolution)

Return Value

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

Explanation

This method retrieves the number of elements in the array returned whenever a supported item is retrieved from the printed specified by the printer name. The EnumPaperSizes, EnumPaperBins, and EnumResolutions methods pass arrays as parameters and the GetArrayNum method can be used to find out how many elements are contained in those arrays.

 

Sample code:

In C++Builder

int Size;
TPoint *Resolutions;

VImageKit1->PrintDraw->PrinterName = "EPSON LP-8200C";
Size = VImageKit1->PrintDraw->GetArrayNum(vikPrinterResolution);
if (Size < 1) return;
Resolutions = new TPoint[Size];
__try {
VImageKit1->PrintDraw->EnumResolutions(Resolutions, Size - 1);
//Various code can go here
--------------
} __finally {
delete[] Resolutions;
}

In Delphi

Size: Integer;
Resolutions: array of TPoint;

VImageKit1.PrintDraw.PrinterName := 'EPSON LP-8200C';
Size := VImageKit1.PrintDraw.GetArrayNum(vikPrinterResolution);
if Size < 1 then Exit;
SetLength(Resolutions, Size);
VImageKit1.PrintDraw.EnumResolutions(Resolutions);
//Various code can go here
--------------

Differences between the ImageKit7/8/9/10

In VCL the constants contain a "v". In ActiveX, the constants are: ikPrinterPaperSize, ikPrinterPaperBin, ikPrinterResolution.

 

The ImageKit10 VCL is a product created by Newtone Corporation