title: How to switch Tab Control among many tab controls VB .NET
body: <p>Dear respected members,</p>
  
  <p>I am using VB .NET and I have a navigation tree view control at the left menu panel. </p>
  
  <p>My winforms has a few tab pages as followed:</p>
  
  <p><strong>(Tab Control 1)</strong></p>
  
  <p>1) Report View </p>
  
  <ul>
  <li><strong>(Tab Control 2)</strong>
  <ul>
  <li>Executive Summary (Tab Page 3)</li>
  <li>Production Summary (Tab Page 4)</li>
  </ul></li>
  </ul>
  
  <p>2) Results View</p>
  
  <p>My tree view works except in one condition:
  When the user clicks:
  Main View -> Result View -> Executive Summary or Production Summary -> Results View
  The WinForms could not load Result View and it shows Executive Summary or Production Summary.
  You can notice the Tab Page is wrong as it shows "Results View", but not "Report View".
  <a href="http://postimg.org/image/hjapvlus5/" rel="nofollow">Snapshot of my result</a></p>
  
  <p>Here are my codes:</p>
  
  <pre><code> Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
      If e.Node.Level = 2 Then
          TabControl2.SelectedIndex = e.Node.Index
          Dim TabName As String
          TabName = TabControl1.SelectedTab.Name
          If TabName.Contains("TabPageResultsView") Then
              TabControl1.Show()
              TabPageReportView.Show()
              TabPageResultsView.Hide()
          End If
      Else
          TabControl1.SelectedIndex = e.Node.Index
          Dim TabName1 As String
          TabName1 = TabControl2.SelectedTab.Name
          If TabName1.Contains("TabPage3") Or TabName1.Contains("TabPage4") Then
              TabControl2.Show()
              TabPageResultsView.Show()
          End If
      End If
  
  End Sub
  </code></pre>
  
  <p>Could you share some hint or guide me?</p>