views:

77

answers:

0

i have used following code to animate a form
while form show bottom to top animation function called,
while form hide top to bottom animation function called. the code works well for bottom to top animation while i am trying to call top to bottom animation while hide animation doesn't doesn't works, the form hides simply without effect.

    Form frm =new Form();
    private void btnTopToBottom_Click(object sender, System.EventArgs e)
    {
      flags=WinAPI.AW_ACTIVATE|WinAPI.AW_VER_POSITIVE|WinAPI.AW_SLIDE;          
      WinAPI.AnimateWindow(we.Handle,1000,flags);
      frm.Hide();
    }



    private void btnBottomToTop_Click(object sender, System.EventArgs e)
    {
      flags = WinAPI.AW_ACTIVATE|WinAPI.AW_VER_NEGATIVE|WinAPI.AW_SLIDE;    
      WinAPI.AnimateWindow(we.Handle,1000,flags);
      frm.Show();
    }