Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer handle..
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00419582
Message ID:
00419610
Views:
22
>Does somebody knows how to access to a printer object like VB's PRINTER object in VFP??
>I am testing an report to PDF library, butt need de handle of the printer...

You need to issue a call to the Win32 API function CreateDC().
DECLARE INTEGER CreateDC IN WIN32API ;
   STRING @ lpszDriverName, ;
   STRING @ lpszDevicename, ;
   INTEGER lpszOutput, ;
   INTEGER lpInitData
hDC = CreateDC("<i>Windows Spooler Name</i>","<i>Printer Device</i>",0,0)
Under Win9x, Windows Spooler Name should be WINSPL16, under NT or Win2K, the name of a supported print provider, normally WINSPOOL

Printer Device is the name assigned to the Windows Printer being used.

See the MSDN Library entry for CreateDC for more details.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform