Quantcast
Channel: Visual Basic Tips and Tricks
Viewing all articles
Browse latest Browse all 2212

FolderBrowserDialog (Visualizzare solo file e cartelle)

$
0
0

Salve!

Vorrei visualizzare solo file e cartelle nella mia listbox, escludento fullpath

esempio listbox:

file

cartella\file

 

il mio codice:

Try
Dim folderDLG As New FolderBrowserDialog

folderDLG.Description = " Select folder"
folderDLG.ShowNewFolderButton = False
Dim folderPath As String
If folderDLG.ShowDialog = Windows.Forms.DialogResult.OK Then
folderPath = folderDLG.SelectedPath
For Each fileAndPath In _
My.Computer.FileSystem.GetFiles(folderPath, _
FileIO.SearchOption.SearchAllSubDirectories, "*.*")
lstFiles.Items.Add(fileAndPath)
Next
End If

 


Viewing all articles
Browse latest Browse all 2212

Trending Articles


HOY PANGIT, MAGBAYAD KA!


Henry el monstruo feliz para colorear e imprimir


Dama y vagabundo para pintar


Girasoles para colorear


Good Morning Quotes


RE: Mutton Pies (jameskoiman)


Hagibis (1946) by Francisco V. Coching


Ka riam ka beit bad ka por riam


Vimeo Create - Video Maker & Editor 1.6.0 by Vimeo Inc


Vimeo 3.42.1 by Vimeo Inc