Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Windows Default printer
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164637
Message ID:
01164645
Views:
11
Hi Borissov. Thanks for your reply.

When I try this, I get an error--> Cannot find Entry Point SetDefaulPrinter
in the DLL

My Code is:
-----------
x=Aprinters(x) && To Get all printers
y=x[1,1] && To get any printer
? setdefaultPrinter(y)

Regards,

Gerard



>>Hi.
>>Anybody know of a way, from within an App, to change the Windows Default
>> Printer to a specific named Printer.
>>(This is required for a POS app where output can only be directed to the Windows Default printer. So I plan to:
>>1. MyPrin = 'Named printer'
>>2. Set Windows Default printerr to MyPrin
>>3. Do the Printing
>>4. Change back to Original Default Printer
>>
>>Its Line 2 I am unsure about.
>>Regards,
>>Gerard
>
>DECLARE integer SetDefaultPrinter IN WINSPOOL.DRV STRING
>
>? SetDefaultPrinter(MyPrin )
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform