Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to set the Default Printer
Message
 
 
To
26/01/2004 08:11:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00870520
Message ID:
00870521
Views:
67
This message has been marked as the solution to the initial question of the thread.
The SetDefaultPrinter Win API function is only available in WIn2K and later. The SetDefaultPrinter WSH method is supported under Win98 and later. Besides that there shouldn't be any difference between them.

>Hi,
>
>Doing a search in messages area I saw both methods (shown below) for doing that. There is one that works better, or is recommended?
>
>Assuming:
>
>cPrinterName = "PDF995"
>
>Method 1:
>
>Declare Integer SetDefaultPrinter In WINSPOOL.DRV String @pPrinterName
>
>SetDefaultPrinter (@cPrinterName)
>
>Method 2:
>
>oSetDefPrinter = CreateObject("WScript.Network")
>
>oSetDefPrinter.SetDefaultPrinter(cPrinterName)
>
>Release oSetDefPrinter
>
>TIA,
>
>Fernando
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform