title: Passing information between two forms from treeview
body: <p>I have a sub that brings a second form with a treeview on it that is populated from an array. I want to click on an item on the array and pass the key and text back to the sub and close the second form. </p>
  
  <p>I feel like this should be easy but I cannot figure this out. The array is passed to the treeview as follows. </p>
  
  <pre><code>    For j = 0 To NoFlowsheets - 1
          Form2.TreeView1.Nodes.Add("Flowsheet" &amp; CStr(j), ColumnNames(j, 0))
          For k = 0 To j_max - 1
              If ColumnNames(j, k) &lt;&gt; "NAME_EMPTY DO_NOT_USE_THIS_NAME" Then
                  Form2.TreeView1.Nodes(j).Nodes.Add("Flowsheet" &amp; CStr(j), ColumnNames(j, k))
              End If
          Next k
      Next j
      Form2.ShowDialog()
  </code></pre>
  
  <p>after this a form pops up with the treeview. I want the user to click on one of the items in the tree view and pass it back to the sub</p>