Solved

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

Posted on 2015-01-16
5
340 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
Comment Utility
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 41

Expert Comment

by:pcelba
Comment Utility
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
Comment Utility
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 41

Expert Comment

by:pcelba
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
A procedure for exporting installed hotfix details of remote computers using powershell
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now