Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Anonymous
Anonymous asked in Computers & InternetSoftware · 9 years ago

How can i open file folder location from listview on double click in vb.net ?

I need small pease of code to open any folder file location from liastview on double click.

I have this small code which is working only for listbox but not for listview.

So the question would be so how can i open file folder from listview using this code or maybe you can suggest me better code ?

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

'open folder

If (ListBox1.SelectedIndex <> -1) Then _

Process.Start(ListBox1.SelectedItem.ToString())

End Sub

2 Answers

Relevance
Still have questions? Get your answers by asking now.