troubleshooting Question

Open File Dir from Listview (VB.NET)

Avatar of RobertoFreemano
RobertoFreemanoFlag for United Kingdom of Great Britain and Northern Ireland asked on
Programming Languages-Other.NET ProgrammingVisual Basic.NET
12 Comments2 Solutions3852 ViewsLast Modified:
Hi Experts,

I'm trying to load filenames of apps from a dir into a LV and when click... I want it to open the dir... not the file.

I used this code to load filenames in DIr
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        For Each fileName As String In IO.Directory.GetFiles("\\fs1gbn1fs005\uu-it-ops-service-desk-only$\Software")
            '  ImageList1.Images.Add(Icon.ExtractAssociatedIcon(fileName))
            ListView1.Items.Add(IO.Path.GetFileName(fileName), ImageList1.Images.Count - 1)
    End Sub
THIS WORKS... but when clicking on the item in LV..
Private Sub ListView1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDoubleClick
For Each file As ListViewItem In ListView1.Items
Dim filePath As String = file.SubItems(0).Text & "\" & file.Text
If file.Selected = True Then
End If
End Sub
This bit does work... & i know its for launching the app... I want to open the dir.
Mike Tomlinson
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Join our community to see this answer!
Unlock 2 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros