Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New printer showing up in error logs
Message
From
31/03/2021 14:58:10
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
31/03/2021 14:46:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01679388
Message ID:
01679394
Views:
38
>Hi Mike,
>
>Nice idea. So the VFP function would fire first because the Win32 call is not set up - but then after that the Win32 call takes precedence (I have not looked that up - since you are online anyhow :-)

I forget who I learned it from, but Sergey made it well known.

>
>Albert
>
>>Hi Albert
>>
>>I've not see the Send To Preview thing. We only recently switched to Win 10.
>>
>>The way we do that is
>>
lcOldPrinter=SET("printer",3)
>>.
>>.
>>.
>>set printer to name (m.lcOldPrinter)
>>
>>By the way, if you create a SetDefaultPrinter.prg like this:
>>
>>SetDefaultPrinter.prg
>>
lparameters tcPrinterName
>>DECLARE LONG SetDefaultPrinter IN WinSpool.drv STRING tcPrinterName
>>RETURN SetDefaultPrinter(m.tcPrinterName)
>>
>>Then you won't have to do the declare each time. All you'll have to do is
>>
SetDefaultPrinter(lcPrinterName)
>>
>>The first time Fox runs the SetDefaultPrinter .PRG. Once that runs one time, all subsequent calls will be directed to the API.
Previous
Reply
Map
View

Click here to load this message in the networking platform