title: C# WinForms AnimateWindow issue
body: <p>I am using the following code to animate a window. 
  Let me explain the visual structure of my program a little bit. I have one FlowLayoutPanel located on top of my Form1 and also many GroupBox objects located on top the FlowLayoutPanel. And finally I have one Button and an invisible RichTextBox object located on top of the GroupBox.</p>
  
  <p>ex: Form1->FlowLayoutPanel->GroupBox->Button and RichTextBox(invisible)</p>
  
  <p>What I'm trying to achieve is, when I click the Button object, I want my RichTextBox to slide downwards. I tried it by creating one button and a RichTextBox on top of my main Form and it worked perfectly fine. However, when I try the same thing using the GroupBox controls at runtime, my Animate function throws an unknown exception.</p>
  
  <pre><code>class Effects
  {
  public enum Effect { Roll, Slide, Center, Blend }
  
  public static void Animate(Control ctl, Effect effect, int msec, int angle)
  {
      int flags = effmap[(int)effect];
      if (ctl.Visible) { flags |= 0x10000; angle += 180; }
      else
      {
          if (ctl.TopLevelControl == ctl) flags |= 0x20000;
          else if (effect == Effect.Blend) throw new ArgumentException();
      }
      flags |= dirmap[(angle % 360) / 45];
      bool ok = AnimateWindow(ctl.Handle, msec, flags);
      if (!ok) throw new Exception("Animation failed");
      ctl.Visible = !ctl.Visible;
  }
  
  private static int[] dirmap = { 1, 5, 4, 6, 2, 10, 8, 9 };
  private static int[] effmap = { 0, 0x40000, 0x10, 0x80000 };
  
  [DllImport("user32.dll")]
  public static extern bool AnimateWindow(IntPtr handle, int msec, int flags);
  }
  </code></pre>
  
  <p>I also noticed that when I call the Animate function using RichTextBox's parent
  e.g Effects.Animate(textBox.parent, Effects.Effect.Slide, 150, 90);</p>
  
  <p>the animation works without any problem.
  I don't know why it works with the parent and not the actual object.
  e.g Effects.Animate(textBox, Effects.Effect.Slide, 150, 90);</p>