使用AnimateWindow函数的效果不是很好.大侠们能不能提供点代码,我想达到下面这种效果:窗体加载有背影图片.显示窗体时,图片和窗体一起慢慢显示出来
(如果使用AnimateWindow函数,则如果显示的慢了,最开始显示的是黑色.)关闭窗体时,图片和窗体一起慢慢消失.请指教.

解决方案 »

  1.   

    用SetLayeredWindowAttributes可以做到
      

  2.   

    //如果使用AnimateWindow函数,则如果显示的慢了,最开始显示的是黑色那是你AnimateWindow用的有问题,参考:
    http://community.csdn.net/Expert/topic/4442/4442164.xml?temp=.8324854
      

  3.   

    去: http://victorns.ys168.com/ 下个模块吧. 
    窗体代码:
    Option ExplicitPrivate Sub Command1_Click()
        TransForm Me, 50, 255, 2, True, True
    End SubPrivate Sub Command2_Click()
        TransForm Me, 50, 255, 2, False, True
    End SubPrivate Sub Command3_Click()
        SetTFVal Me, 255
    End SubPrivate Sub Form_Load()
        TransForm Me, 0, 255, 3, True, True
        Command1.Caption = "淡入"
        Command2.Caption = "淡出"
        Command2.Caption = "指定透明度"
    End Sub