title: Slider panel that hides components inside it
body: <p>What event(s) would I use to handle hiding a button/component that is inside this panel? This is a sliding panel that when the user hovers over, it expands and when the mouse exits, it collapses. </p>
  
  <p>The problem is I don't know how to keep the components from showing until it is expanded. </p>
  
  <pre><code> Public Class Form1
  
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
          Panel1.Dock = DockStyle.Left
          Timer3.Enabled = True
      End Sub
  
  
      Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
          If Panel1.Width &lt; 150 Then
              Panel1.Width = Panel1.Width + 100
          ElseIf Panel1.Width = 150 Then
              Timer1.Enabled = False
          End If
      End Sub
  
      Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
          If Panel1.Width &gt;= 100 Then
              Panel1.Width = Panel1.Width - 50
              If Panel1.Width &lt; 100 And Panel1.Width &gt; 25 Then
                  Panel1.Width = Panel1.Width - 1
              End If
  
          ElseIf Panel1.Width = 25 Then
              Timer2.Enabled = False
          End If
      End Sub
  
  
      Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
          If Panel1.ClientRectangle.Contains(Panel1.PointToClient(MousePosition)) Then
              If Not Timer1.Enabled AndAlso Panel1.Width &lt; 150 Then
                  Timer1.Enabled = True
                  Timer2.Enabled = False
              End If
          Else
              If Not Timer2.Enabled AndAlso Panel1.Width &gt; 25 Then
                  Timer1.Enabled = False
                  Timer2.Enabled = True
              End If
          End If
      End Sub
  
  
  End Class
  </code></pre>