Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set the default printer?
Message
From
08/12/2003 05:55:34
Michale Chen
Shijiazhuang ZhiYuan Crop.
Shijiazhuang, China
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
How to set the default printer?
Miscellaneous
Thread ID:
00856774
Message ID:
00856774
Views:
96
Hello everyone:

Could you gave me some advice on how to set the default printer? I want to using the following code but it didn't work, it return cann't found the dll entrance. Thank you.

LOCAL lcOldPrinter AS String, ;
lcNewPrinter AS String

lcOldPrinter = SET("Printer", 2)
lcNewPrinter = GETPRINTER()
IF NOT EMPTY(lcNewPrinter)
SET PRINTER TO NAME (lcNewPrinter)
ENDIF


* Declare the API call, NOTICE the specific name
* for the DLL here!
DECLARE Integer SetdefaultPrinter IN ;
WINSPOOL.DRV String

* Set the printer
SetDefaultPrinter( (lcNewPrinter) )
Next
Reply
Map
View

Click here to load this message in the networking platform