Volte
02-23-2002, 07:14 PM
ListView File Explorer #1
I wrote this in about 25 or 30 minutes. What it is, is an example of using a ListView as a file explorer. This is only the first version. Right now, there is no sorting (you can't click the column headers to sort), the icons are built in (there's no icon association detection), double clicking files doesn't do anything yet, etc.
This is just version #1, meant to demonstrate how to do it. The next version will most likely have all of those things in it.
VB6 (or function replacements) required, due to use of InStrRev and some VB6 common controls.
[edit - oops, found a mistake already. :o Nothing major just replace this (in lvwFiles_DblClick()):If GetAttr(lvwFiles.SelectedItem.Key) = vbDirectory ThenWith this:If (GetAttr(lvwFiles.SelectedItem.Key) And vbDirectory) = vbDirectory ThenOtherwise directories such as Program Files are not openable]
I wrote this in about 25 or 30 minutes. What it is, is an example of using a ListView as a file explorer. This is only the first version. Right now, there is no sorting (you can't click the column headers to sort), the icons are built in (there's no icon association detection), double clicking files doesn't do anything yet, etc.
This is just version #1, meant to demonstrate how to do it. The next version will most likely have all of those things in it.
VB6 (or function replacements) required, due to use of InStrRev and some VB6 common controls.
[edit - oops, found a mistake already. :o Nothing major just replace this (in lvwFiles_DblClick()):If GetAttr(lvwFiles.SelectedItem.Key) = vbDirectory ThenWith this:If (GetAttr(lvwFiles.SelectedItem.Key) And vbDirectory) = vbDirectory ThenOtherwise directories such as Program Files are not openable]