Home All Groups Group Topic Archive Search About
Author
22 Nov 2006 10:32 PM
Joe
I am rewritting a vb6 application and Iam stuch on how to replace the
textwidth command.  Any suggestions?

Author
22 Nov 2006 10:45 PM
Herfried K. Wagner [MVP]
<J**@aol.com> schrieb:
>I am rewritting a vb6 application and Iam stuch on how to replace the
> textwidth command.

'System.Drawing.Graphics.MeasureString'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/
Author
23 Nov 2006 11:29 AM
Phill W.
J**@aol.com wrote:
> I am rewritting a vb6 application and Iam stuch on how to replace the
> textwidth command.  Any suggestions?

I always used to use a hidden Label, set its Caption and read off its
Width.  Maybe I still can ...

In the Brave New World,

   System.Drawing.Graphics.MeasureString()

does the job; the "fun" part is finding a Graphics object that you can
use to do this ...   ;-)

HTH,
    Phill  W.