Hi Cetin,
>Yes I used them but couldn't assign results to a specific object (directly writing on form is OK). However you don't need them. You can calculate how many would fit using regular VFP functions (fontmetric,sysmetric,txtwidth) and set your controlsource to be your calculatorUDF(). In FoxyClasses I even didn't bother to use ellipsis, just show how much fits (one line editbox control).
Thanks for the reply. In my case, I was looking for an efficient technique to emulate VFP 9's ability to "ellipsize" truncated content in listbox and grid columns. I can't use an editbox because I'm using single line textbox/labels and my customer wants to know if there is extra content not being displayed.
Did you try using DrawText() with the DT_MODIFYSTRING parm? In theory, this should add ellipsis to your string so that you can in turn display it as you want. I've built my own function to add ellipsis using a form's TextWidth method - it works but it doesn't seem too efficient and thus I was hoping there might be some better solutions already.
Malcolm