Hi,

I tried the following code to try to 'disolve' a form window but when i press the button, nothing happens. Know why?

Pls tell me , many many thanx~!

VB Code:
  1. Option Explicit
  2.  
  3. Private Declare Function AnimateWindow Lib "user32" ( _
  4.            ByVal hwnd As Long, _
  5.            ByVal dwTime As Long, _
  6.            ByVal dwFlags As Long _
  7. ) As Boolean
  8.  
  9. Const AW_BLEND = &H80000 'Uses a fade effect. This flag can be used only if hwnd is a top-level window.
  10. Const AW_SLIDE = &H40000
  11.  
  12. Private Sub Command1_Click()
  13. Me.AutoRedraw = True
  14.  
  15. Dim RetVal
  16. AnimateWindow Me.hwnd, 4000, AW_BLEND
  17.  
  18. End Sub