Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding name of active printer in VFP5.0
Message
From
30/08/1999 11:00:50
 
 
To
30/08/1999 09:55:35
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00259088
Message ID:
00259179
Views:
23
>>>>Set("Printer",2) gives me the name of the installed standard printer in Windows. What I am looking for in VFP 5.0 is a way to find the name of the active printer. I want to show the user the name of the active printer in my standard 'print out'-dialog. In VB it can be done like this:
>>>>
>>>>Dim PrinterNAme as String
>>>>PrinterName = Application.ActivePrinter
>>>>
>>>>Petter Andersen
>>>
>>>Pls advs. What do u mean by active printer ???
>>>
>>>Additionally u can look at these functions :-
>>>Getprinter(), Aprinter(), prtinfo()
>>
>>Hello, Dubai and thanks for your reply.
>>
>>By active printer I mean, the printer that is currently/last chosen. If you run sys(1037) you can change the active printer from within VFP. But how can you afterwards find out which printer this is?
>
>Pls note that Dubai is name of the place, my name is Vinod !!!
>
>Pls use following :-
>
>cPrinter=Getprinter()
>
>Which will save the chosen value in variable.. If user pressed Esc then return value will be empty..

GETPRINTER() doesn't give you access to the Property sheet; if the user changes the printer there, you can't find it out using SET('PRINTER') in VFP5.0a - that's why SET('PRINTER',3) was added to VFP6.

If the user can live without access to the full printer setup dialog, the GETPRINTER() is usable, but you need to save the current setting somewhere and maintain it at all times in VFP 5.
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
Next
Reply
Map
View

Click here to load this message in the networking platform