Hello again...
I use for my combobox this code... but i have a problem with this!
If i hit twice the combobox the data from the file "jd.mbm" is duplicating!
Code:Private Sub cmb_judet_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb_judet.DropDown Me.cmb_judet.SelectAll() Dim str As IO.StreamReader = IO.File.OpenText(Application.StartupPath & ".\data\jd.mbm") While Not str.EndOfStream Dim line As String = str.ReadLine() Me.cmb_judet.Items.Add(line) End While End Sub
How can i hit the combobox more than once without duplicating the data ?!
Thanks in advice!




Reply With Quote