title: VB Tab control in draw.mode
body: <p>I am trying to make the tabs show horizontally on the right side of my form.  I can't use tabcontrol from tool box because of how the text displays.
  I am using a code that I found to help me. But after exhausting all of my resources I can't seem to get the code to point to the tabPages collection. I have entries in there but the tabs show up blank. </p>
  
  <pre><code> Public Sub New()
      tabControl1 = New TabControl()
      Dim tabPage1 As New TabPage()
  
      ' Sets the tabs to be drawn by the parent window Form1. 
      ' OwnerDrawFixed allows access to DrawItem. 
      tabControl1.DrawMode = TabDrawMode.OwnerDrawFixed
  
      tabControl1.Controls.Add(tabPage1)
      tabControl1.Location = New Point(25, 25)
      tabControl1.Size = New Size(250, 250)
  
      tabPage1.TabIndex = 0
  
      myTabRect = tabControl1.GetTabRect(0)
  
      ClientSize = New Size(300, 300)
      Controls.Add(tabControl1)
  
      AddHandler tabControl1.DrawItem, AddressOf OnDrawItem
  End Sub!
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/aCHQC.jpg" rel="nofollow">tab Example</a></p>