How can I find out how wide a particular string of text is when it is shown using a particular font? I already figured out how to get the height, but the width seems much more elusive.
I used to be able to use TextWidth in VB6.
Printable View
How can I find out how wide a particular string of text is when it is shown using a particular font? I already figured out how to get the height, but the width seems much more elusive.
I used to be able to use TextWidth in VB6.
Well, I found what I was looking for. I should've looked a little longer before posting this question.
For anybody who's wondering, you can use the Graphics.MeasureString Method to get both the height and width.