title: vb.net combobox hide item
body: <p>I have a combobox that when the item is selected and it's the same as a button.text in other form the button.text changes for the name that the user typed in a textbox. But if the item is different of the button.text I want to hide it, so the user can't select it or see it.</p>
  <p>cafetariacombo is the combobox<br> Form3.cafetaria2.Text is the button I'm changing</p>
  <pre><code>  If cafetariacombo.SelectedItem = &quot;cafetaria2&quot; Then
                  Form3.cafetaria2.Text = TextBox1.Text
                  My.Settings.cafetaria2guardar = Form3.cafetaria2.Text
                  My.Settings.Save()
  end if
  </code></pre>
  <p>I use this to name the button, I just need to know if I can hide the combobox item.</p>
  <p>Help me please :)</p>
  <h1>Update with some code</h1>
  <p>I inserted the list of items myself in the combobox.
  I solved my earlier problem, but now i need to save the state of the combobox items when I leave the form.</p>
  <pre><code>Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
              If cafetariacombo.SelectedItem &lt;&gt; Form3.cafetaria1.Text Then
          cafetariacombo.Items.Remove(&quot;cafetaria1&quot;)
      End If
  
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      If ComboBox2.SelectedItem = Form3.cafetaria1.Text Then
          Form3.cafetaria1.Text = &quot;cafetaria1&quot;
          My.Settings.cafetaria1guardar = Form3.cafetaria1.Text
          My.Settings.Save()
          adicionarproduto.cafetariacombo.Items.Add(&quot;cafetaria1&quot;)
      end if
    end sub
  </code></pre>
  <p>When I remove the item from the combobox I'm in form1 and when I add the item again I'm in form2. <br>Just need to save the combobox with the deleted item when I leave the form1.</p>