ListView File Explorer

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]

Volte
02-24-2002, 08:33 AM
ListView File Explorer #2

OK, this is the continuation to the first version. I think it came along quite nicely. :)

Some New Features

You can now sort the listview by any one of it's columns, ascending or descending
The icon displayed beside the file is now the actual associated icon
Double clicking any file will open it in it's associated program -- anything with no association will do nothing
Fixed the bugs from the previous version


Download it, check it out. If you find any bugs, PM me, or post if you can.

Edit -- I just reuploaded it. The first time I had used the 'Enterprise Edition Control' template, which added a lot of unneeded controls. Fixed.

Fixed another bug as well.

Volte
02-24-2002, 02:51 PM
ListView Explorer #3 (w/ TreeView!)

The third, possibly final in the explorer series. Now there's a treeview off to the left side of the form with directories in it. I don't know if I've perfected it (it can be a bit slow on huge directories) but I think it's pretty good.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum