private void label2_Paint(object sender, PaintEventArgs e)
{//绘制label中文字
string text = "Sri Lanka";
Graphics g = e.Graphics;
Font font = new Font("Arial", );
Brush brush = new SolidBrush(Color.Black);
float lineSpacing = 0.5f; SizeF size = g.MeasureString("A", font); float pos = 0.0f;
for (int i = ; i < text.Length; ++i)
{
string charToDraw = text.Substring(i, );
g.DrawString(charToDraw, font, brush, pos, 0.0f);
SizeF sizeChar = g.MeasureString(charToDraw, font);
pos += sizeChar.Width + size.Width * lineSpacing;
}
}