Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating length of printed string.
Message
 
To
16/01/2000 18:24:25
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00318779
Message ID:
00318793
Views:
19
>>Let's say the font is Arial Normal 8 and FONTMETRIC(6), the average width, is 5 pixels. Leaving out TXTMETRIC() to make the example simple, let's say all of the characters in the string are "average".
>
>I don't know the answer to what your asking, but I have a little trick to get the real length of a string in screen pixels. Add a label to a form, set its top to -100 and its Font and Size to whatever your measuring, and its caption to the string. Then Set its AutoSize to .T. and just read the length.

I should have said "Mailing Label" but I'm wondering if there is any way to use this technique. The old way of finding the Currently Selected printer was to create a dummy report and then see what FoxPro put in the TAG field.
Previous
Reply
Map
View

Click here to load this message in the networking platform