title: Form height of panel
body: <p>I am having questions about a program that I'm developing. Sorry if my post is not clearly legible, as a beginner programming perfectionist I try to explain everything clearly as possible.</p>
  
  <p>I have a Windows Form called frmMain.vb with two separate panels, one is called sidebarPanel and the other one is called mainPanel:</p>
  
  <p><img src="https://i.stack.imgur.com/W6kdo.png" alt="http://i.stack.imgur.com/Zs2lt.png"></p>
  
  <p>At runtime, this is how the form looks like:
  I reduced the screen to let it fit in this topic, the actual size is 900, 600 through this code at frmMain_Load:</p>
  
  <pre><code>Me.Size = New Size(900, 600)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/gdA3z.png" alt="http://i.stack.imgur.com/gdA3z.png"></p>
  
  <p>Now I have created the following piece of code:</p>
  
  <pre><code>With sidebarPanel
      .Top = 0
      .Left = 0
      .Width = 200
      .Height = 300
  End With
  
  With mainPanel
      .Top = 0
      .Left = 200
      .Width = 200
      .Height = 300
  End With
  </code></pre>
  
  <p>In case you're wondering how the sidebar is blue, that piece comes from a dll, that piece of the code I've left out to keep this question easy. If you look closely at the source code you can see that the sidebar has a width of 200 and the mainpanel start 200 width from the left.</p>
  
  <p>With that out of the way. I want to know the answer, I've searched Stackoverflow, Google and some VB.NET forums about these questions but I seem to be a loner.</p>
  
  <p>How can I make the sidebar a full 100% height to the form so if I resize, the sidebar will change height too. That same question goes for the mainpanel.</p>
  
  <p>Thank you for reading and thank you for the hospitality and the answer.</p>