HelpTriggering List Box Double Click Event

Posts 1–4 of 4 · Page 1 of 1
Triggering List Box Double Click Event
I made a search engine and i wanted to know when the list box gives me the name of the item i search for ... how can i open this item when i double click it in the listbox ? what code should i use or what should i do? thanks in advance.
Code:
Private Sub ListBox1_DoubleClick (ByVal Sender As Object, e As EventArgs) Handles ListBox1.MouseDoubleClick
Try
If Not ListBox1.SelectedItem Is Nothing Then
Process.Start(ListBox1.SelectedItem.ToString())
End If
Catch Ex As Exception

End Try
End Sub


Add this code to your form's code which contains the ListBox. Rename ListBox1 with the name of your listbox.
it doesnt work idk why... but thanks anw...
Never mind it works ... but i have another question... how to let the program put the file location of the item in the list?
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us