Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting default Printer name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01157411
Message ID:
01157413
Views:
18
>I want to restore the setting of the default printer:My code goes like:
>
>1. Store Current Default printer ???
>2. x=Set printer to name GetPrinter()
>3. ......Do some Code
>4. Restore Printer to its default ?//
>
>Anybody know the commands for Line 1 and 4
>I tried x=Set('Printer') but this just returns On or Off
>
>Regards,
>Gerard

Check SET() function in HELP, the topic where PRINTER is parameter, it says:
PRINTER    -  ON or OFF
PRINTER, 1 - FileName or PortName
PRINTER, 2 - Default Windows printer name
PRINTER, 3 - Default Visual FoxPro printer name(specified in the Visual FoxPro Print or Print Setup dialog boxes)
So you can use:
lcWndPrtName = SET([PRINTER],2) && Default Windows Prinetr
lcVFPPrtName = SET([PRINTER],3) && Default VFP Printer
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform