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

Posted on 2015-01-16
Medium Priority
Last Modified: 2015-01-19
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 ?
Question by:User9865
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 29

Accepted Solution

Olaf Doschke earned 1500 total points
ID: 40554867
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.
LVL 42

Expert Comment

ID: 40555172
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...
LVL 29

Expert Comment

by:Olaf Doschke
ID: 40555317
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.
LVL 42

Expert Comment

ID: 40556064
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.
LVL 29

Expert Comment

by:Olaf Doschke
ID: 40557094
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.

Featured Post

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question