Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? chr() function

Status
Not open for further replies.

catool

Programmer
Apr 11, 2000
4
CA
How do I set up the Visual Foxpro(3.0 to 6.0) to dispay proper ASCII&nbsp;&nbsp;symbols on screen for chr 128 to 254&nbsp;&nbsp;on screen and set up space bewteen each characters( e.g. 3 mm between characters)?<br>e.g. ? chr(179) suppose dispaly bar symbol on screen.<br>I use ? chr(179) function , It did not displayed bar symbol on screen when I run distributed EXE file ?<br>
 
You probably want to specify &quot;FoxPro Window Font&quot; as your default font. It should be included with all FPW/VFP distributions, I think. -SK
 
What SKelly might have been referring to is &quot;FoxFont&quot;.&nbsp;&nbsp;To see what Catool was referring to, go to the Command Window at type:<br><br><FONT FACE=monospace>? _screen.fontname<br>? chr(179)</font><br><br>The first will probably return &quot;Arial&quot;, and the second will return some character other than the vertical bar Catool wants.&nbsp;&nbsp;Now try this:<br><br><FONT FACE=monospace>_screen.fontname=&quot;FoxFont&quot;<br>? chr(179)</font><br><br>Now, hopefully, you will see the vertical bar that so many of us have fond memories of from the FoxDOS days. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
No, actually it is &quot;FoxPro Window Font&quot;, if chr(179) is supposed to be a pipe character - &quot;FoxFont&quot; is the old DOS FoxPro font that was meant to mimic DOS for Windows, but using this shows a different character than a pipe for chr(179). Take a look at both and use whichever looks like what you want - the point is it's probably a font issue.<br><br>SK<br>
 
Well, I used the command <br><FONT FACE=monospace>_screen.font=&quot;FoxFont&quot;</font> <br>on my NT box that has never seen either FPDOS or FPW, and it works as advertised - chr(179) shows up as a vertical bar.&nbsp;&nbsp;FoxFont shows up in my &quot;program files\visual studio\vfp98&quot; directory, whereas &quot;FoxPro Window Font&quot; does not show there or in Fonts on <i>my</i> machine.&nbsp;&nbsp;Perhaps our installation choices where different. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Thanks for Robert Bradley and SK 's Suggestions.<br>I tried the commands at VfP windows. It works O.K. ON VFP command windows, but it would not on the distrubuted test.exe(VFP not loaded condition).<br>? _screen.fontname=&quot;foxfont&quot;<br>? chr(179)
 
Catool, I think we need more information:&nbsp;&nbsp;where are you trying to do this?&nbsp;&nbsp;On a form?&nbsp;&nbsp;Report?&nbsp;&nbsp;A specific object (like a textbox) on the form?&nbsp;&nbsp;In a table's column?<br><br>If its on a form, you're better off using the <FONT FACE=monospace>Line</font> control. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Foxdev, I tried to write the test.prg which will display the ASCII character(ASCII value 1 to 255) on the screen .<br>When operator Input 179, Screen will display Vertical bar, <br>IF VFP not load, it will not display proper character.<br>What other commands need to display proper ASCII chr when VFP not loaded.Installed the test.exe on computer without VFP SW.
 
Just a wild guess.&nbsp;&nbsp;Maybe you should copy the appropriate font file to the computer running test.exe?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top