string text = "aaaaaa"; float width1 = e.Graphics.MeasureString( text, new Font("calibri", 12, GraphicsUnit.Pixel)).Width; float width2 = 0; for (int i = 0; i < text.Length; i++) { width2 += e.Graphics.MeasureString( text[i].ToString(), new Font("calibri", 12, GraphicsUnit.Pixel)).Width; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)