By using the below code, you can animate for closing the window.
Private 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 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(500), winHide Or winBlend) Me.Close() End Sub
|
No responses found. Be the first to respond and make money from revenue sharing program.
|