I am doing a ListBox project
here is the example:
[img]http://i213.photobucket.com/albums/cc8/n9370/a4htm7.jpg[/img]
I almost down this project. but i still have somewhere need your help.
When i double click an item on toplist, i will move the item to the bottom list
For example, when i double click Acer, it will be to the bottom list.
which do the same thing when i click the button "move to bottom list"
i know how to write the code for that button,
here is my code for that
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = ListBox1.Items.Count - 1 To 0 Step -1
If ListBox1.GetSelected(i) = True Then
ListBox2.Items.Add(ListBox1.Items(i).ToString)
ListBox1.Items.RemoveAt(i)
End If
Next
End Sub
but i don't know how to write for the selected item on double clicking. how do i write this?
Another problem i have is that
my testbox should be enabled only when any text present in the text box
how do i fix my code to do it? thank you.
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "" Then
Button3.Enabled = False
End If
End Sub