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
Solved

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

Posted on 2015-01-16
5
415 Views
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 ?
0
Comment
Question by:User9865
  • 3
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 500 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.
0
 
LVL 42

Expert Comment

by:pcelba
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):
_screen.Line(10,10,20,20)
More info in VFP help
CLEAR
_screen.DrawWidth = 2
_screen.CurrentX = 0
_screen.CurrentY = 150
FOR i = 0 TO 6*PI() STEP 0.1
  _screen.Line(100*i,-100*sin(i)+150)
NEXT
_screen.CurrentX = 0
_screen.CurrentY = 50
FOR i = 0 TO 6*PI() STEP 0.1
  _screen.Line(100*i,-100*cos(i)+150)
NEXT
_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.Circle(10*i)
NEXT
_screen.ForeColor = 0

Open in new window


And again: Forget about DOS even when it is useful knowledge sometimes...
0
 
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.
0
 
LVL 42

Expert Comment

by:pcelba
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.
0
 
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.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Toolbar in a formset deletion 1 302
FoxPro Visual Studio 2013 10 1,029
Find Records That Occur in TABLE1.DBF but not in TABLE2.DBF 5 117
DBF to ... Converter 5 81
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…
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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