length of text in textbox for any font
Hi All,
Using VB 6 I want to find out the length of text (in twips?) in a textbox regardless of which font is being used (not a count of characters).
I've tried both
GetTabbedTextExtent()
and
GetTextExtentPoint32()
but they both return 0 even though I can see that there are characters in the textbox.
Thank you.
length of text in textbox for any font
That seems to do it. I did set the form's properties as you suggested. I tried setting the text box width based on the TextWidth of it's content and I had to add to add another 100 twips for all the text to display. For option button captions I had to add another 295.
This is interesting and thank you for pointing me in this direction.