General information
Category:
Coding, syntax & commands
Thanks Fred,
I knew I used it before, but since it wasn't such a common item, I went blank.
Thanks again...
>>I am trying to find out what the currently selected Windows printer is. I have looked at many functions from aprinters(), getprinter(), sys(1037), sys(6), etc...
>>
>>These will basically call up the prompt dialog, or give you a listing of all possible choices of installed printers.
>>
>>This may require an API call to determine this value. Anyone have experience with this I would appreciate the input.
>>
>>
>>TIA
>
>Are you talking about the current windows printer or the current printer that VFP is printing to?
>
>The current windows printer is SET('PRINTER',2) and VFP6's SET('PRINTER',3).
>For VFP5 the current VFP printer can be found via some trickery:
>
>1) Create a dummy cursor file
>
>CREATE CURSOR x (x C(1))
>
>2) Create a "quick report" from that cursor
>
>CREATE REPORT x FROM x
>
>3) Now open the X.FRX report as a table. The first records EXPR field contains info about the current printer that VFP is printing to. The DEVICE= line will have the name of the printer.
>
>USE x.frx
>? x.expr
>
>4) CLOSE and ERASE the dummy tables/reports. The cursor will erase itself when closed, but the report needs to be erased.
>
>USE
>ERASE x.frx
>ERASE x.frt
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only