Hello,
I'm trying put some animation effects in my windows form application. here is my code:-
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
and in the formclosing event:-
Private Sub add_branch_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
AnimateWindow(Me.Handle.ToInt32, CInt(1200), winHide Or winBlend)
e.Cancel = False
End Sub
This's not working , if I'm making this form as a child of my MDI form,i.e.
Private Sub AddBranchToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddBranchToolStripMenuItem.Click
add_branch.Show()
add_branch.MdiParent = Me
End Sub
It works without making it a child for the MDI,but How can I implement the animation with making the form as a child becoz if's not a child, then i'm loosing the form by clicking outside. I can't use showDialog().
Thankx for help....