Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WANG -Specifying Printer Name
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00519269
Message ID:
00519292
Views:
17
>Hi
>
>Has anybody any experience of printing using the WANG image control to a specific printer.
>
>I currently create an Array using APRINTERS(gaprinters)
>and allow the user to set a default printer for printing Images.
>
>However when I run
>
>oWangobject.printimage(,,,,lcprinter) &&where lcprinter in this case is "HP Laserjet 4Si" - a valid printer name
>
>I get the message invalid function call
>
>Alternatively does anybody know how to programmatically change the default printer
>
>TIA
>
Simon,

If the Windows Script Host is an option, then the WScript.Network object has a method to set the default printer. I'd suggest that the original be restored after the print job is done. Ed Rauh and I covered this in the fourth of our series on the WSH in last December's issue of the VFUG (www.vfug.org) newsletter. It's available on-line at the site.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform