Solved

Using Icons

Posted on 2004-09-28
5
194 Views
Last Modified: 2012-05-05
Hi

Im trying to add icons to my listview depending on the the file contained within it...

For example say i wanted to find the Icon for the following file

C:\SomeFile\myfile.asd

Would would be the best way to do this (using the registry is the only way i guess?) and how would I then add this icon to my listview?

I have some code for finding icons from the registry, its a little cumbersome though, and im hoping someone has a better solution, the more important thing is how can I add the icon to the listview (or an imagelist if needs be) - this should be the easy part but I just dont know how to handle the icons.

Thanks
0
Comment
Question by:KarlPurkhardt
  • 4
5 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 12168341
Here's a link to an article that describes how to retrieve the icon associated with a given file type.  

http://vbnet.mvps.org/index.html?code/icon/icon16statbar.htm
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12168348
0
 
LVL 76

Accepted Solution

by:
David Lee earned 175 total points
ID: 12168362
And another by someone different.

http://www.vb-helper.com/howto_show_file_icons.html
0
 
LVL 4

Author Comment

by:KarlPurkhardt
ID: 12168468
Thats exactly what I was looking for, thanks.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12168518
You're welcome.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code 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…
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…

760 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

17 Experts available now in Live!

Get 1:1 Help Now