Solved

file listview

Posted on 1999-01-19
3
241 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

740 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