Determining Size of Graphics.DrawString

  • Thread starter Thread starter robfarmergt
  • Start date Start date
R

robfarmergt

I want to be able to call Graphics.DrawString and determine the
dimensions (height and width) what what was just drawn. Does anyone
know a way to determine this?

Thanks,
Rob
 
I want to be able to call Graphics.DrawString and determine the
dimensions (height and width) what what was just drawn. Does anyone
know a way to determine this?

Thanks,
Rob

Hi Rob,

s = string, f = font and g = graphics

g.MeasureString(s,f).Width
g.MeasureString(s,f).Height

Benjamin
 
Back
Top