Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working out the current default printer
Message
From
11/03/2008 08:44:22
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01300801
Message ID:
01300809
Views:
17
>Hi
>
>What's the easiest way to work out the name of the default printer?

Hi Robin

try


DECLARE INTEGER GetDefaultPrinter IN winspool.drv;
STRING @ pszBuffer,;
INTEGER @ pcchBuffer

nBufsize = 250
cPrinter = REPLICATE(Chr(0), nBufsize)

= GetDefaultPrinter(@cPrinter, @nBufsize)
cPrinter = SUBSTR(cPrinter, 1, AT(Chr(0),cPrinter)-1)


Nick
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform