System.Drawing.Graphics 클래스 MeasureString 매서드 이용
>
public Size GetTextSize(IntPtr hdc, String str, Font font) { Graphics g = Graphics.FromHwnd(hdc); SizeF sizeF = g.MeasureString(str, font); return sizeF.ToSize(); }
System.Drawing.Graphics 클래스 MeasureString 매서드 이용
>
public Size GetTextSize(IntPtr hdc, String str, Font font) { Graphics g = Graphics.FromHwnd(hdc); SizeF sizeF = g.MeasureString(str, font); return sizeF.ToSize(); }