Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the font at runtime
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00097252
Message ID:
00097294
Views:
19
Sarah,

Build a report file on the fly.

Create a report with just the string you want to print.
Create a cursor with one record for each font. (fontcursor)
open the report as a table with USE
copy the report to a new temp.frx file
find the record with the string as the Expr
scatter memvar
scan the fonts cursor
fontFace = fontcursor.Field
insert into temp from memvar
endscan
use in temp
report form temp

>I've been nagged for awhile to create a printout of all the fonts on a users system. He does desktop publishing and has a zillions and finds it hard to manage them all. While doing some other work I discovered AFONT() and the example in the help text. What I'd really like is to create an adhoc report.
>
>However I can't see anything in the report designer to allow me to change the font at run time.
>
>I've put a bit of the code I've been playing with which was taken from the help file below.
>
>=AFONT(gaFontArray) && Array containing font names
>for nCount = 1 to 100
>? ALLTRIM(gaFontArray(nCount)) && Display font name
>?? ' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' FONT gaFontArray(nCount), 8 && it's this font command I want to replicate!
>endfor
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform