改变有图片背景的Form大小时,Form发生闪烁,请教如何消除闪烁现象?
步骤:
1.创建新工程
2.添加Image控件,属性 Stretch=True
                      picture = app.path & "\sy4.bmp"
3.编写代码。为使图片随窗口的大小改变而改变,编写如下代码:
   Private Sub Form_Load()
      Image1.Width = Me.Width / Screen.TwipsPerPixelY
      Image1.Height = Me.Height / Screen.TwipsPerPixelX
   End Sub   Private Sub Form_Resize()
      Image1.Width = Me.Width / Screen.TwipsPerPixelY
      Image1.Height = Me.Height / Screen.TwipsPerPixelX
   End Sub
4. 运行。
    当改变窗口的大小时,窗口发生闪烁现象:

解决方案 »

  1.   

    不使用 Form 背景,而是在窗体上放一个 Image 控件,其 Stretch 属性 = True。
      

  2.   

    试试在.
    Private Sub Form_Activate()
          Image1.Width = Me.Width / Screen.TwipsPerPixelY
          Image1.Height = Me.Height / Screen.TwipsPerPixelX
    ENDSUB
    里也加代码
      

  3.   

    那是因为你的机子问题,CPU跟不上,加载图片本来就需要一定的时间,如果想要解决这个问题只有问微软了
      

  4.   

    使用Image存放背景图片!
      

  5.   

    用API把要显示的区域先锁定,然后等图片显示完后再解锁,在视觉上就不会有闪动。就此,其它闪动问题用此办法也可以解决。