public void HidePanel()
 {
     if (this.InvokeRequired)
     {
         SetPanelOperation cb = new SetPanelOperation(HidePanel);
         this.Invoke(cb);
     }
     else
     {
         AnimateWindow(Handle, 300, AW_VER_NEGATIVE | AW_HIDE | AW_SLIDE);
         this.Hide();
         this.chart1.Visible = false;
     }
 }
 public void HidePanel()
 {
     if (this.InvokeRequired)
     {
         SetPanelOperation cb = new SetPanelOperation(HidePanel);
         this.Invoke(cb);
     }
     else
     {
         AnimateWindow(Handle, 300, AW_VER_NEGATIVE | AW_HIDE | AW_SLIDE);
         this.Hide();
         this.chart1.Visible = false;
     }
 }
 public void ShowPanel()
 {
     if (this.InvokeRequired)
     {
         SetPanelOperation cb = new SetPanelOperation(ShowPanel);
         this.Invoke(cb);
     }
     else
     {
         AnimateWindow(Handle, 300, AW_VER_POSITIVE | AW_SLIDE);
         this.Show();
         this.chart1.Visible = true;
     }
 }
 public void ShowPanel()
 {
     if (this.InvokeRequired)
     {
         SetPanelOperation cb = new SetPanelOperation(ShowPanel);
         this.Invoke(cb);
     }
     else
     {
         AnimateWindow(Handle, 300, AW_VER_POSITIVE | AW_SLIDE);
         this.Show();
         this.chart1.Visible = true;
     }
 }