×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

? chr() function

? chr() function

? chr() function

(OP)
How do I set up the Visual Foxpro(3.0 to 6.0) to dispay proper ASCII  symbols on screen for chr 128 to 254  on screen and set up space bewteen each characters( e.g. 3 mm between characters)?
e.g. ? chr(179) suppose dispaly bar symbol on screen.
I use ? chr(179) function , It did not displayed bar symbol on screen when I run distributed EXE file ?

RE: ? chr() function

You probably want to specify "FoxPro Window Font" as your default font. It should be included with all FPW/VFP distributions, I think. -SK

RE: ? chr() function

What SKelly might have been referring to is "FoxFont".  To see what Catool was referring to, go to the Command Window at type:

? _screen.fontname
? chr(179)


The first will probably return "Arial", and the second will return some character other than the vertical bar Catool wants.  Now try this:

_screen.fontname="FoxFont"
? chr(179)


Now, hopefully, you will see the vertical bar that so many of us have fond memories of from the FoxDOS days.

Robert Bradley

FoxDev - Visual FoxPro Development

RE: ? chr() function

No, actually it is "FoxPro Window Font", if chr(179) is supposed to be a pipe character - "FoxFont" 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.

SK

RE: ? chr() function

Well, I used the command
_screen.font="FoxFont"
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.  FoxFont shows up in my "program files\visual studio\vfp98" directory, whereas "FoxPro Window Font" does not show there or in Fonts on my machine.  Perhaps our installation choices where different.

Robert Bradley

FoxDev - Visual FoxPro Development

RE: ? chr() function

(OP)
Thanks for Robert Bradley and SK 's Suggestions.
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).
? _screen.fontname="foxfont"
? chr(179)

RE: ? chr() function

Catool, I think we need more information:  where are you trying to do this?  On a form?  Report?  A specific object (like a textbox) on the form?  In a table's column?

If its on a form, you're better off using the Line control.

Robert Bradley

FoxDev - Visual FoxPro Development

RE: ? chr() function

(OP)
Foxdev, I tried to write the test.prg which will display the ASCII character(ASCII value 1 to 255) on the screen .
When operator Input 179, Screen will display Vertical bar,
IF VFP not load, it will not display proper character.
What other commands need to display proper ASCII chr when VFP not loaded.Installed the test.exe on computer without VFP SW.

RE: ? chr() function

Just a wild guess.  Maybe you should copy the appropriate font file to the computer running test.exe?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close