Animation fermeture Application
Voila un petit code sources bien sympa qui permettra à votre application de disparaître avec beauté !
Démonstration de l'effet :
Code source :
Public Class Form1
Private Const AW_BLEND = &H80000
Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Int32, ByVal dwTime As Int32, ByVal dwFlags As Int32) As Boolean
Dim winHide As Integer = &H10000
Dim winBlend As Integer = &H80000
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AnimateWindow(Me.Handle.ToInt32, CInt(1500), winHide Or winBlend)
Me.Close()
End Sub
Cordialement P1l0u
Démonstration de l'effet :
Code source :
Public Class Form1
Private Const AW_BLEND = &H80000
Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Int32, ByVal dwTime As Int32, ByVal dwFlags As Int32) As Boolean
Dim winHide As Integer = &H10000
Dim winBlend As Integer = &H80000
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AnimateWindow(Me.Handle.ToInt32, CInt(1500), winHide Or winBlend)
Me.Close()
End Sub
Cordialement P1l0u
Publicité