Get width of string

Dec 31, 2014 at 8:47 AM
Edited Dec 31, 2014 at 8:47 AM

how can I get the width of string? -> Or is there any way to center a string?
Dec 31, 2014 at 10:14 AM
There is the FW1_CENTER and FW1_VCENTER (V for vertical) flags that can be OR'd with other flags used in DrawString.
There's also MeasureString that returns the rectangle of a string.