Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Escape Sequences in VFP
Message
From
23/09/1999 23:38:13
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00267709
Message ID:
00268355
Views:
26
>>>I'm trying to send an escape sequence from a vfp program to print a signature that is on a DIMM Chip in my laser printer (HP 4000). But the Escape character (chr(27)) gets stripped out and the following sequence get's printed, instead of activating the signature to print. Is VFP or the Windows driver stripping out my Escape? How can I stop this from happening?
>>>
>>>Thanks!
>>
>>Can you show us (list code, etc.) exactly what you're trying to do?
>
>This is from within a report. So I can't use ???. Basically for security reason's the signature is stored on a ROM chip on a DIMM. So what I want to do is put the cursor is the appropriate place and dump my Escape sequence. which would normally go something like chr(27)+'(s0p8.00h8.4v0s0b0TA' or something like that. Basically the picture is stored as a font character 'A'. The only problem is the Escape is getting stripped out.

I can think of several approaches. All of them basically force the string you want to be imbedded in the middle of your report where it can't be stripped out by a printer driver.

1. Use a UDF in a form field. For example, in the field expression put in

MyString(), where that function returns the string value you want.

2. Investigate printing to a file, then dumping the file to the appropriate printer port (e.g. LPT1.DOS) with a COPY FILE command.

3. In the Files section I believe there are classes that access the Win32API to accomplish #2 with more reliability and flexibility.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform