wezel Freshman
Joined: 09 Oct 2003 Posts: 30
|
Posted: Oct 14th, 2003 08:22 AM Post subject: AnimateWindow |
|
|
This API call animates a window (fade, scroll,...)
| Code: |
Private Declare Function AnimateWindow Lib "user32" (ByVal lngHwnd As Long, ByVal lngTime As Long, ByVal lngFlags As Long) As Boolean
Const AW_HOR_POSITIVE = &H1 'Animates the window from left to right. This flag can be used with roll or slide animation.
Const AW_HOR_NEGATIVE = &H2 'Animates the window from right to left. This flag can be used with roll or slide animation.
Const AW_VER_POSITIVE = &H4 'Animates the window from top to bottom. This flag can be used with roll or slide animation.
Const AW_VER_NEGATIVE = &H8 'Animates the window from bottom to top. This flag can be used with roll or slide animation.
Const AW_CENTER = &H10 'Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used.
Const AW_HIDE = &H10000 'Hides the window. By default, the window is shown.
Const AW_ACTIVATE = &H20000 'Activates the window.
Const AW_SLIDE = &H40000 'Uses slide animation. By default, roll animation is used.
Const AW_BLEND = &H80000 'Uses a fade effect. This flag can be used only if hwnd is a top-level window.
Private Sub Form_Load()
AnimateWindow Form1.hWnd, 200, AW_CENTER
End Sub
|
If you want the effext to go faster/slower, change the 200 (it's the duration of the effect, in milliseconds)
For another effect, use another Constant...
Wesley _________________ Real Programmers don't comment their code - it's hard to write, it should be hard to read |
|