制作电影特效效果

Posted on 2019-01-15 22:13  努力成长静待花开  阅读(190)  评论(0编辑  收藏  举报

实现效果:

   

知识运用:

  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);
        }