title: VB.NET ComboBox results selected item
body: <p>Hi I have a vb windows form application that has a ComboBox from the form1 I have some code that reads some registry and adds item results to combobox. I would like to select one of the results and run a start process. My problem is where do I put the code when item is selected then do something and how to I determine what has been selected?</p>
  
  <p>My Code to query registry keys</p>
  
  <pre><code> Dim Key, Reader As RegistryKey, Y As String
      Key = Registry.LocalMachine.OpenSubKey("SOFTWARE\AppStream\AppMgr\Shortcuts", False)
      For Each X In Key.GetSubKeyNames
          Reader = Registry.LocalMachine.OpenSubKey("SOFTWARE\AppStream\AppMgr\Shortcuts\" &amp; X, False)
          If Reader.GetValueNames().Contains("AppTitle") Then
              Y = Reader.GetValue("AppTitle")
  
              If Not ComboBox1.Items.Contains(Y) Then ComboBox1.Items.Add(Y)
          End If
  </code></pre>
  
  <p>If i do somehting like this, it just shows a blank messagebox and I have not selected that text from combobox yet.</p>
  
  <pre><code>If ComboBox1.SelectedText Then
              MessageBox.Show(ComboBox1.SelectedText())
          End If
  </code></pre>