Description
Sets the printer to use for the next print function call. This function does not affect open jobs.
Syntax
PrintSetPrinter ( printername )
Return value
Integer. Returns 1 if the function succeeds and -1 if an error occurs.
Usage
The printername argument must use the same format as returned by the PrintGetPrinter function.
Examples
This example sets the printer to the first printer in the list retrieved by the PrintGetPrinters function:
long ll_place string ls_setprn string ls_prntrs = PrintGetPrinters ( ) ll_place=pos (ls_prntrs, "~n") mle_1.text = PrintGetPrinters ( ) ls_setprn = Left (ls_prntrs, ll_place - 1) PrintSetPrinter (ls_setprn)
See also