Solved

file listview

Posted on 1999-01-19
3
210 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
3 Comments
 

Expert Comment

by:kianwei
Comment Utility
please show me your code, thanks
0
 
LVL 4

Expert Comment

by:mcix
Comment Utility
0
 
LVL 2

Accepted Solution

by:
FlorisMK earned 60 total points
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now