Graphics graphics = CreateGraphics(); SizeF sizeF = graphics.MeasureString(lblAccount.Text, new Font(this.Font.Name,this.fontSize, FontStyle.Regular)); graphics.Dispose(); int xWidth = Convert.ToInt32(sizeF.Width);