Places the names of printers currently installed in the Windows Print Manager into a variable array.
Syntax
APRINTERS(ArrayName)
Returns
Numeric
Arguments
ArrayName
Specifies the name of the array containing the names of the installed printers and their ports. If the array you include doesn't exist, Visual FoxPro automatically creates the array. If the array exists and isn't large enough to contain all the printer information, Visual FoxPro automatically increases the size of the array to accommodate the information. If the array is larger than necessary, Visual FoxPro truncates the array. If the array exists and APRINTERS( ) returns 0 because no printers are installed, the array remains unchanged. If the array doesn't exist and APRINTERS( ) returns 0, the array isn't created.
Remarks
APRINTERS( ) creates a two-dimensional array. The first column of the array contains the names of the currently installed printers, and the second column contains the ports to which the printers are connected.
APRINTERS( ) returns the number of installed printers. If no printer is installed, it returns 0.
Visual FoxPro obtains the names of the installed printers and their ports from Windows. However, Visual FoxPro doesn't check to see if the printers are actually connected to your machine.