@ ... say c_Symbol in Visual Foxpro 9.0 SP2 in Windows 8

I am drawing graphs on screen row by row in FoxPro 9.0 SP2
I want to display the thick south east arrow symbol on the screen.
A sample of the code is :
@20, 45 say chr(26)  color ("W+/N")  style "B"
The above displays a tiny right arrow. The row and column, 20 and 45 change with each point.
chr(26) is in codepage 1252 but NOT the south east arrow .
My database is all in English.
I find a thick south east arrow symbol ( roughly \ ) with a Unicode of U+2198   or  ? of   ↘                                        
How do I display the south east arrow symbol  using the @.... say command above ?
Who is Participating?
Olaf DoschkeConnect With a Mentor Software DeveloperCommented:
This is all about codepages. AS a side note (if you have the time to get a deeper understanding, here's an article clearing the misunderstanding ASCI vs ANSI vs Unicode and Singel vs Double Byte character sets: http://codesnipers.com/?q=whether-double-byte-is-ansi)

First of all code 26 is in all codepages, They all have codes 0-255 (1 byte) and as mentioned above ANSI may even include double byte character sets, but Unicode is different.

All you need os the symbol of a diagonal arrow with its tip pointing SE. You could simply put in an image, there is no need to have this as character. As you see for yourself Windows-1252 has no such symbol, I don't even see other arrows and I don't find any DOS codepages with arrows. Most probably you come from a legacy application and maybe have used a font redefining some characters against sepcification. You can have any character using a modified font.

Forget about displaying Unicode in VFP, you couldn't in dos and you can't in VFP withou using ActiveX controls able to display unicode. The best you have is FontCharSet, enabling you to use a font and a certain script of it, eg ANSI western or greek or cyrillic.

Several famous font not defining the characters by codepage definition are even offical: WingDings, WingDings 2 and 3 have all symbols. Symbol is another one.

Wingdings 3 has all arrows needed from chr(0x66) to chr(0x6d).

Bye, Olaf.
Old DOS painting in Windows 8 world? Wow!

BUT forget about it!

What feature of FoxCharts does not fit your needs? http://vfpx.codeplex.com/releases/view/106904

You can also call Line() method to draw the line on screen (or on any FoxPro form):
More info in VFP help
_screen.DrawWidth = 2
_screen.CurrentX = 0
_screen.CurrentY = 150
FOR i = 0 TO 6*PI() STEP 0.1
_screen.CurrentX = 0
_screen.CurrentY = 50
FOR i = 0 TO 6*PI() STEP 0.1
_screen.CurrentX = _screen.Width/2-100
_screen.CurrentY = _screen.Height/2
FOR i = 0 TO 20
  _screen.ForeColor = RGB(255*RAND(), 255*RAND(), 255*RAND())
_screen.ForeColor = 0

Open in new window

And again: Forget about DOS even when it is useful knowledge sometimes...
Olaf DoschkeSoftware DeveloperCommented:
Well, Pavel.

the easiest way to reuse a legacy application is 1:1 as is, isn't it?

It's time to upgrade indeed, or find a DOS emulator or older hardware to run this legacy software piece, but I see nothing wrong in keeping it where it is at first.

Since this is so old, you better reimplement the thing, there is no good end result in keeping screens on a windows platform, even though Windows 8 somewhat is retro about the flat design. just a trend of todays UI.

In the context of previous themes with gradients an old screen with its monospaced font will even look more out of place than on Windows 8.

To be very clear about the retro solution:
@20, 45 say chr(0x6d)  color ("W+/N")  style "B" Font "Wingdings 3"

Open in new window

Bye, Olaf.
I would guess this is not legacy application reusing but who knows. In such case I would like to know what font was used in the old environment.

To show the FoxCharts graph in a standalone window in this old fashioned application could be very cool...

And if the @say commands are generated at run-time then to draw lines, circles, or boxes instead of @says should be very easy.
Olaf DoschkeSoftware DeveloperCommented:
If this is not needed to mend legacy code, indeed @..say/get/to should not be used.

The help states "Included for backward compatibility." That should be taken seriously, the @ commands only exist to keep legacy code running.

On a Windows desktop you have pixel positions, graphics mode, not text mode. You can use shapes (..to), labels (...say), textboxes (..get) and can display anything not textual in an image. VFPX gdiplusx and foxcharts help you create high quality look graphs as images and even directly on the form canvas. Forget about ascii art. Not just because it's outdated.

Bye, Olaf.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.