General information
Category:
Coding, syntax & commands
Title:
GetPrinter() and SYS(1037)
Hope someone can help here...
We need the functionality of sys(1037) but return the name of printer chosen.
Problem is this... We have an app running under both NT and 98. (using VFP 6, SP 3). We can use GetPrinter() to pick a printer and get the name, but when we try SET PRINTER TO {printer} (under 98) and SET PRINTER TO NAME {unc} (under NT), they don't respect the setting and still appear to print to the default Windows printer.
However, when using sys(1037), it does change the VFP printer default but we need to keep track of what printer was chosen. Yes, by using SET( 'PRINTER',3) should return the chosen printer selection, but doesn't.
If you run the following lines of code directly from the command window it works ok, but when run via an EXE, the return of SET('PRINTER',3) returns same value as first value.
x = SET('PRINTER', 3 ) && ex: Returns HP Laser
SYS(1037) && ex: Select IBM Printer
y = SET('PRINTER', 3 ) && from the EXE, still shows HP Laser
Any help greatly appreciated.
Thanks
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only