private void Form1_Resize(object sender, EventArgs e)
{
pixels = Math.Min(label1.Height, label1.Width/2.8);
float fontSize = (float)(pixels * 0.8 * 72.0 / 96.0); //this is the magic
this.Font = new Font("Arial", fontSize, FontStyle.Bold);
}
No comments:
Post a Comment