This method retrieves the paper tray names and tray numbers from the printer designated by the printer name.

[C++Builder]   [ int = ]imagekitcontrolname->PrintDraw->EnumPaperBins(UnicodeString * BinNames, const int BinNames_Size, Word * BinNumbers, const int BinNumbers_Size)
[Delphi]   [ Integer = ]imagekitcontrolname.PrintDraw.EnumPaperBins(var BinNames: array of string; var BinNumbers: array of Word)

Parameters

Name Explanation
BinNames An array containing the retrieved paper tray names
In C++Builder, pass the BinNames count - 1 into BinNames_Size
BinNumbers An array containing paper tray numbers
In C++Builder, pass BinNumbers count - 1 into BinNumbers_Size

Return Value

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

Explanation

The EnumPaperBins method retrieves the supported paper tray names and tray numbers from the printer designated by the printer name. If you need to know the number of elements in the array, the GetArrayNum method can be used to retrieve this.

Sample code:

In C++Builder

int Size;
UnicodeString *BinNames;
Word *BinNumbers;

VImageKit1->PrintDraw->PrinterName = "EPSON LP-8200C";
Size = VImageKit1->PrintDraw->GetArrayNum(vikPrinterPaperBin);
if (Size < 1) return;
BinNames = new UnicodeString[Size];
BinNumbers = new Word[Size];
__try {
   VImageKit1->PrintDraw->EnumPaperBins(BinNames, Size ? 1, BinNumbers, Size ? 1);
   // do stuff here
   ********************
} __finally {
   delete[] BinNames;
   delete[] BinNumbers;
}

In Delphi

Size: Integer;
BinNames: array of string;
BinNumbers: array of Word;

VImageKit1.PrintDraw.PrinterName := 'EPSON LP-8200C';
Size := VImageKit1.PrintDraw.GetArrayNum(vikPrinterPaperBin);
if Size < 1 then Exit;
SetLength(BinNames, Size);
SetLength(BinNumbers, Size);
VImageKit1->PrintDraw->EnumPaperBins(BinNames, BinNumbers);
// do stuff here
********************

Differences between the ImageKit7/8/9/10

BinNames has been changed from a string type to a string array.
In C++Builder it is necessary to pass in the count of BinNames and BinNumber parameters.

The ImageKit10 VCL is a product created by Newtone Corporation