Solved

file listview

Posted on 1999-01-19
3
247 Views
Last Modified: 2011-09-20
how do i make an explorer-type file listbox using listview?
I need a listview that looks like explorer set in list mode.
I tried doing it using a imagelist for the icons, but I can't get the icons to display in smallicons or list mode, and it selects an extra white line with the filename
0
Comment
Question by:daveander
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:kianwei
ID: 1469452
please show me your code, thanks
0
 
LVL 4

Expert Comment

by:mcix
ID: 1469453
0
 
LVL 2

Accepted Solution

by:
FlorisMK earned 60 total points
ID: 1469454
Create a ListView on a form.
Give it the desired number of columns in design view (say 3).
Add two ImageLists, one for large icons (32x32), one for small icons (16x16).
Add desired icons (an image with index 1 in both imagelists is assumed here).
Attach the image lists to the listview.

Add code like this to the Form_Load

Dim l as ListItem
With ListView1.ListItems
    Set l = .Add(,,"Item1",1,1)
    l.SubItems(1) = "Info in second column"
    l.SubItems(2) = "Info in third column"
    ' And again for each item to add
End With

Manipulate the .View property to go to list view.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question