Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Old Foxbase Printer commands in VFP 5.0
Message
From
27/07/1999 13:26:58
 
 
To
27/07/1999 11:53:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00246233
Message ID:
00246739
Views:
16
>Thanks for your response Paul. The old Foxbase, as well as VFP 5.0 (at least according to the documentation!), does not require SET DEVICE TO PRINTER in order to issue the ??/??? commands, only the SET CONSOLE OFF and SET PRINT ON. Actually, according to the VFP 5.0 documentation, the ??? doesn't even require the SET PRINT ON, it should go directly to the printer.
>

What's missing is you need to tell Windows not to get in the way - the easiest way to do that is to install the Windows Generic Text/Printer driver for the default printer and print to that, or send the output to a text file and then copy the text file to the printer once you've finished - there's a FAQ entry describing how to do that using the Windows API for the file copy operation.

>Unfortunately, even though the VFP 5.0 documentation says that ?? and ??? should work, I can't get them to work properly. In the old Foxbase code, I placed the ASCII printer control codes in a memory variable and then used ?? with a macro substitution of the memory variable (see sample previously posted below). Unfortunately, VFP 5.0 gives me a run-time error when using ?? with the macro substitution. I can't get it to work any other way.
>
>I guess I would also like to try and find some detailed documentation on the _PSCODE, _PECODE and other _P variables. Again, unfortunately, the VFP 5.0 documentaion has nothing on these commands. Do you know of an Internet site that might have info (white paper?) on any of this stuff?
>
>Jere
>
>>Hi:
>>
>>Have you tried SET DEVICE TO PRINTER?
>>
>>HTH,
>>
>>--Paul
>>
>>
>>>For too many reasons to go into, I am having to try and re-use much of the printer code (@ SAY) in an old application being "converted" to VFP 5.0
>>>
>>>The old code used to do something like so:
>>>
>>>MP12 = CHR(27) + "&k2s"
>>>SET CONSOLE OFF
>>>SET PRINT ON
>>>*GO TO 12 PITCH
>>>?? &MP12
>>>SET PRINT OFF
>>>SET CONSOLE ON
>>>
>>>In order to send ASCII printer control codes to the printer to control things like pitch, orientation, compression, underlining, etc.
>>>
>>>However, the ?? construct doesn't seem to be supported in VFP 5.0
>>>
>>>Are there other methods or syntax that could duplicate the above types of printer control commands when using the old @ SAY technique of printing. I saw somewhere previously that there might be some _ (underscore) type of command to do this.
>>>
>>>Help!!
>>>
>>>Jere Wilson
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