实现效果:
知识运用:
Lable控件的Font属性
PictureBox控件的Size属性
实现代码:
private void button1_Click(object sender, EventArgs e) { timer1.Start(); pictureBox1.Visible = false; label1.Visible = true; } private void button2_Click(object sender, EventArgs e) { timer1.Start(); pictureBox1.Visible = true; label1.Visible = false; } private void timer1_Tick(object sender, EventArgs e) { label1.Font = new Font(label1.Font.FontFamily,label1.Font.Size+1); pictureBox1.Size = new Size(pictureBox1.Width+5,pictureBox1.Height+5); }