Hello All,
While trying to create a program that quickly listed many files in a folder (as fast as Windows Explorer) I came across the idea of using a WebBrowser control to list files on a hard drive. (And I thank this forum for that.) This looks just like the list in Explorer, and has some great built in functionality, but I can't figure out how to filter which file or folder can be listed in the WebBrowser. Can someone point me in the right direction?
With a WebBrowser control, called WebBrowser1 on a form, this quickly lists the contents of c:
WebBrowser1.Navigate ("c:\")
And this shows the files in a detail list:
WebBrowser1.Document.CurrentViewMode = 4
While the selected file is:
WebBrowser1.Document.FocusedItem.Name
I would love to filter the display to only show, say executables (*.exe, *.bat)
I found the view mode by accident on a web search, and then the selected item via a debug watch, but can't find a way of only displaying given files. Any ideas?
I have tried the various examples with the listview, and have a treeview showing the folders. I have used the same code provided in the FAQ "Searching for files using the API" but find the WebBrowser control to display the files and folders much faster. If I could figure out how to quickly read the list from the WebBrowser control, this would be great.
Of course, a faster way of putting the files and folders in a listview would also be nice, just in case the WebBrowser is a wild goose chase...
Regards,
Karl Sumwalt
Bel Air, MD USA
While trying to create a program that quickly listed many files in a folder (as fast as Windows Explorer) I came across the idea of using a WebBrowser control to list files on a hard drive. (And I thank this forum for that.) This looks just like the list in Explorer, and has some great built in functionality, but I can't figure out how to filter which file or folder can be listed in the WebBrowser. Can someone point me in the right direction?
With a WebBrowser control, called WebBrowser1 on a form, this quickly lists the contents of c:
WebBrowser1.Navigate ("c:\")
And this shows the files in a detail list:
WebBrowser1.Document.CurrentViewMode = 4
While the selected file is:
WebBrowser1.Document.FocusedItem.Name
I would love to filter the display to only show, say executables (*.exe, *.bat)
I found the view mode by accident on a web search, and then the selected item via a debug watch, but can't find a way of only displaying given files. Any ideas?
I have tried the various examples with the listview, and have a treeview showing the folders. I have used the same code provided in the FAQ "Searching for files using the API" but find the WebBrowser control to display the files and folders much faster. If I could figure out how to quickly read the list from the WebBrowser control, this would be great.
Of course, a faster way of putting the files and folders in a listview would also be nice, just in case the WebBrowser is a wild goose chase...
Regards,
Karl Sumwalt
Bel Air, MD USA