How to unselect a ComboBox ?

TheCrystal9

New member
Joined
Aug 4, 2010
Messages
4
Programming Experience
Beginner
Good day everyone ..

I have a combobox, I set its "drop down style" property to "drop down list"

Then I wanted when th user clicks on the form the combobox becomes unselected so i wrote this code:

PHP:
Dim s As String
        s = ComboBox1.Text
        ComboBox1.Text = ""
        ComboBox1.Text = s

But it's not working, if I clicked on the form, the combobox is still selected, so how to solve this problem ?
 
What exactly do you mean by "the combobox becomes unselected"? Do you mean that the control loses focus? If so then you can set the form's ActiveControl property to Nothing.
 
Yes I ment losing focus, but now you've created another prob for me ^_^ I can't find this ActiveControl I'm using visual stodio 2008
 
Anyway I ment the blue bar that appears when selecting an item, this I don't want to appear when the user clicks on the forrm

Hope somebody will answer me

Greetings ..
 
Back
Top