>Hello all,
>
>I know this was discussed recently, but I no longer have my PUTM so I can not do the search myself. I am looking for a simple example of using GDI+ to do what TxtWidth() is suppose to do.
>
>Just need to get the length of a string based on Font, Style, Size, etc
>
>Thanks in advance....
>
>Bob
It's just an approximate way, but it may give satisfactory results for screen interface:
Lparameters cString,cFontname,nFontsize,cFontstyle
nFontmetric=Fontmetric(6,cFontname,nFontsize,cFontstyle)
nMytextwidth=Txtwidth(cString,cFontname,nFontsize,cFontstyle)*nFontmetric
Edward Pikman
Independent Consultant