title: Animated Panel in C#
body: <p>I am trying to add a panel when a button click. My code is below and I did it. But now I am trying to put on my panel other buttons etc and when you click the first button and the panel slide in there aren't any of my new buttons.</p>
  <pre><code>//Constants
      const int AW_SLIDE = 0X40000;
      const int AW_HOR_POSITIVE = 0X1;
      const int AW_HOR_NEGATIVE = 0X2;
      const int AW_BLEND = 0X80000;
  
          [DllImport(&quot;user32&quot;)]
          
          static extern bool AnimateWindow(IntPtr hwnd, int time, int flags);
          photosflag=0;
             
   private void photosbutton_Click(object sender, EventArgs e)
          {
              if (photosflag == 0)
              {
                  object O = Controller.Properties.Resources.ResourceManager.GetObject(&quot;photospressed&quot;);
                  photosbutton.Image = (System.Drawing.Image)O;
                  photosflag = 1;
                  int ylocation = photosbutton.Location.Y;
                  //Set the Location
                  photospanel.Location = new Point(101, ylocation);
  
                  //Animate form
                  AnimateWindow(photospanel.Handle, 500, AW_SLIDE | AW_HOR_POSITIVE);
                  
                  
              }
              else
              {
                  object O = Controller.Properties.Resources.ResourceManager.GetObject(&quot;photos&quot;);
                  photosbutton.Image = (System.Drawing.Image)O;
                  photosflag = 0;
                  photospanel.Visible = false;
  
              }
             
             
          }
  </code></pre>
  <p>In the photos panel, I have three picture boxes. But when the panel shows up (slide-in) the picture boxes there aren't exist.</p>