EFFECTS SUR FORM

cs_schtroumf Messages postés 59 Date d'inscription mercredi 8 octobre 2003 Statut Membre Dernière intervention 22 juillet 2008 - 2 mai 2006 à 20:36
cs_schtroumf Messages postés 59 Date d'inscription mercredi 8 octobre 2003 Statut Membre Dernière intervention 22 juillet 2008 - 2 mai 2006 à 20:36
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/37385-effects-sur-form

cs_schtroumf Messages postés 59 Date d'inscription mercredi 8 octobre 2003 Statut Membre Dernière intervention 22 juillet 2008
2 mai 2006 à 20:36
Salut, juste pour t'informer qu'il existait des dizaines de codes qui font ça sur vbfrance et beaucoup qui utilisent l'API AnimateWindow qui permet de faire un bon nombre d'effets d'ouverture et de fermeture de fenetre :) pour rappel:

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 Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Long, ByVal dwTime As Long, ByVal dwFlags As Long) As Boolean

et à mettre dans le code d'une form par exemple:

AnimateWindow Me.hwnd, 200, AW_VER_POSITIVE Or AW_HOR_NEGATIVE Or AW_HIDE
Set Form1 = Nothing
Rejoignez-nous