>I used Sysmetric/Fontmetric/TxtWidth/Getfont/Scols/Srows and other, but I Dont Get Results.
>
>from a table with memofields.
>
>>first record containing the data :
>IIIIIIIIIAIIIIIIIIIBIIIIIIIIICIIIIIIIIIDIIIIIIIIIEIIIIIIIIIFIIIIIIIIIGIIIIIIIIIHIIIIIIIIIJIIIIIIIIIKIIIIIIIIILIIIIIIIIIMIIIIIIIIINIIIIIIIIIOIIIIIIIIIPIIIIIIIIIQIIIIIIIIIRIIIIIIIIISIIIIIIIIITIIIIIIIIIUIIIIIIIIIVIIIIIIIIIWIIIIIIIIIXIIIIIIIIIYIIIIIIIIIZ
>
>record 2 containing :
>WWWWWWWWW1WWWWWWWWW2WWWWWWWWW3WWWWWWWWW4WWWWWWWWW5WWWWWWWWW6WWWWWWWW7WWWWWWWWW8WWWWWWWWW9WWWWWWWWW0
>
>From the command windows I Typed :
>
>_SCREEN.SCALEMODE=3
>_SCREEN.FONTNAME='Arial Narrow'
>_SCREEN.FONTSIZE=8
>SET MEMOWIDTH TO 95
>
>
>USE nametable
>
>Go record 1
>?nametable.memofield && I see only two lines but memlines return 3 lines
>?memlines(nametable.memofield) && Return 3
>?txtwidth(nametable.memofield) && Return 152.25 pixels as default
>
>Go record 2
>?nametable.memofield && I see 3 lines, but memlines return only 2 lines
>?memlines(nametable.memofield)
>?txtwidth(nametable.memofield) && Return 190.50 Pixels as default
>
>
>records are free of space blank
>records are free of (13) and (10) ASCII code
>I used AFONT, FONTMETRIC, GETFONT, SYSMETRIC, TXTWIDTH but
>I Dont get results,
>
>The code that I was typed is incorrect ?
>What about twips in Fox Pro ?
>Is there a function or lib that I can Buy ?
>
>Thanks Very Much Again
Carlos,
Instead of a new thread it would be better to point out what you didn't understand. As said before memlines() and ? results should only match with a monospaced font.
Twips could be used in fox as well. As a sample below is a partial routine that I use to precisely size table columns in word (word uses points - 1 point = 20 twips) :
DECLARE INTEGER GetDeviceCaps IN Win32API;
INTEGER hdc, INTEGER nIndex
DECLARE INTEGER GetWindowDC IN Win32API;
INTEGER hWnd
#DEFINE WU_LOGPIXELSX 88
lnPixelsPerInch = GetDeviceCaps(GetWindowDC(0), WU_LOGPIXELSX )
lnSizeInPixels = txtwidth(lcSampleText, lcFont, lnFontSize) * fontmetric(6, lcFont, lnFontSize)
lnSizeInPoints = ( lnSizeInPixels / lnPixelsPerInch * nTwipsPerInch + (567 * 0.1) ) / 20
Cetin