VB.NET: Trigger Event inside Listbox

toytoy

Well-known member
Joined
Jul 16, 2004
Messages
46
Programming Experience
1-3
Does anyone know how to trigger the event inside the listbox when i double click on it....

Say when i double click on one of the items, it will bring me to another form...

Thanks
 
it wouldnt be a double click, but you can code the selectedindexchanged event for a listbox to take the user to another form
 
VB.NET:
 Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
 		Dim f As New Form2()
 		f.TextBox1.Text = ListBox1.SelectedItem
 		f.Show()
 	End Sub
 
Back
Top