Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer name?
Message
From
10/06/1997 15:53:47
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00035839
Message ID:
00035861
Views:
40
I did look at the PRTINFO() function but none of the parameters return the name of the selected printer. Basically, I have a text box on my form that lets the user know the current printer. If the user changes the printer (with SYS(1037)) I want to change the value of my text box. SYS(1037) doesn't return anything. I want what GETPRINTER() returns without issuing a GETPRINTER(). I don't need a dialog, I just want to know the name of the printer. SET("PRINT",2) comes closest but doesn't change even if you change the selected printer using SYS(1037).

Elyse

>>How can I get the name of the currently selected Windows printer? (VFP 5.0) SYS(1037) lets me change it, APRINTERS() puts the names of ALL the printers into an array and SET("PRINT",2) gives me the default printer name, but none of them do what I want.
>>
>>Thanks
>>Elyse
>
>Elyse,
>
>I'm not sure of exactly what the problem is here. I assume that you're using SYS(1037) to make certain changes in the page settings, and you need to find out what they are. Look at the PRTINFO() function. You also might consider using the Common Dialogs ActiveX control. It sounds like part of the problem is that the SYS() function doesn't return a value, and GETPRINTER() doesn't do what you need. If this is the case, then the ActiveX control may be exactly what you need.
>
>HTH,
>
>George
Elyse Pomerantz
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform