View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Hotbird[_2_] Hotbird[_2_] is offline
external usenet poster
 
Posts: 19
Default Window Animation

Thank you Michel for this version of the code. It now runs for me, and I
have been able to create the different effects of roll up/down/left right as
well as fading. Very interesting and thank you.


"Michel Pierron" wrote in message
...
Hi Hotbird;
For example:
Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Long _
, ByVal dwTime As Long, ByVal dwFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const AW_HOR_POSITIVE = &H1
Private Const AW_HOR_NEGATIVE = &H2
Private Const AW_VER_POSITIVE = &H4
Private Const AW_VER_NEGATIVE = &H8
Private Const AW_CENTER = &H10
Private Const AW_HIDE = &H10000
Private Const AW_ACTIVATE = &H20000
Private Const AW_SLIDE = &H40000
Private Const AW_BLEND = &H80000
Public objForm As UserForm1


Sub RollDiagPos()
Dim lngHwnd As Long
Dim lngRet As Long
Set objForm = New UserForm1
lngHwnd = FindWindow(vbNullString, objForm.Caption)
lngRet = AnimateWindow(lngHwnd, 600, AW_HOR_POSITIVE + _
AW_VER_POSITIVE + AW_ACTIVATE)
End Sub

MP