Solved

for bin_huwairib

Posted on 1998-06-07
6
181 Views
Last Modified: 2010-05-03
Some time ago you recommended a means of extracting a file's icon with SHGetFileInfo.  Can you recommend a means of extracting an file's icon simply based on it's file extension.  Since I am creating an FTP client program and using a treeview and listview control, I would like to represent the remote files with their corresponding images and cannot use SHGetFileInfo for this task.  Any advice would be appreciated.  Thanks, John
0
Comment
Question by:hozempa
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Expert Comment

by:zsi
ID: 1462741
You can maintain an image list that has icons for the files that you want to support.  However, there are a lot of file extension combinations out there.  Also, you will not be able to show the individual icons for executable programs, normally the program's icon.
0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462742
hozempa,

I'm sorry because of my late response.

zsi is correct, it is better to create an image list for the supported extensions and it is usually a binary file icon and a text file icon. And regarding SHGetFileInfo it won't work because it's require the file to be exist in the client machine to be able to extract the icon. And in your case you just have the name of the file so you need to download the whole file first in order to use this function which is not practical.

Anyway if you need any further information, check the article Q175179 at http://support.microsoft.com 


Best regards
Bin Huwairib
0
 
LVL 1

Author Comment

by:hozempa
ID: 1462743
Bin Huwairib, thanks for the information.  I didn't think there was a way to do it aside from transferring the files onto the local system.   Still, I appreciate the response.  If you would still like the points, please send any answer to this question.
Thanks, hozempa
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462744
hozempa,

I will be glad if you give the points to szi because he had respond before me, beside my comment was not so far from his that's why he deserve it.

zsi, please lock the question to get the points.


Best regards
Bin Huwairib
0
 
LVL 1

Author Comment

by:hozempa
ID: 1462745
That's fine with me, if it's agreeable with you.  Zsi, please post any response and I'll award you the points.
0
 
LVL 4

Accepted Solution

by:
zsi earned 50 total points
ID: 1462746
Of course, this question *was* directed to Bin.  I was just adding a comment.  Didn't mean to snag the points from ya, Bin. :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use closed file on desktop in vba 6 65
DIR issue 7 50
VBA : retain and exclude values based on a config sheet and multiple parameters 5 52
MsgBox 2 47
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

932 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

10 Experts available now in Live!

Get 1:1 Help Now