feiyucha

实现效果:

  

知识运用:

  PictureBox控件的Height和Width属性

  和PictureBox控件的SizeMode属性  //PictureBoxSizeMode枚举值

  

实现代码:

        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            try
            {
                pictureBox1.Width = (int)(trackBar1.Value * pictureBox1.Image.Width * -0.2);
                pictureBox1.Height = (int)(trackBar1.Value * pictureBox1.Image.Height * -0.2);
            }
            catch {} 
        }

 

分类:

技术点:

相关文章:

  • 2021-12-22
  • 2021-11-05
  • 2022-01-01
  • 2021-11-29
  • 2021-10-15
  • 2021-12-22
  • 2021-12-22
  • 2021-08-07
猜你喜欢
  • 2021-12-25
  • 2021-12-09
  • 2021-12-07
  • 2021-12-02
  • 2021-12-05
  • 2021-12-13
  • 2021-11-20
相关资源
相似解决方案