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 12:14:50
 
 
To
27/07/1999 11:56:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00246233
Message ID:
00246679
Views:
12
Thanks again Todd for responding, but unfortunately just simply issuing ?? MP12 causes the characters to be printed on the report, rather than being taken as a printer control code. I can't believe this is turning out to be such a pain!!! It's bad enough having to fight with Report Writer to do certain things, but I can't believe it's so hard for VFP 5.0 to backward support basic printer commands. I really need to find some info on the _P series of printer variables. Any other thoughts??

Jere

>DOH! I CANNOT believe that I missed this! Argh!
>
>Your string is the escape character followed by some other stuff. You have no need for the & character. You are macro expanding a variable that contains printer codes, not a variable reference. Just use ?? MP12 in your program.
>
>
>>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.
>>
>>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
Jere Wilson
N:deavor Systems, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform