Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to list files with icon? (like windows explorer)

Posted on 2002-07-29
20
Medium Priority
?
345 Views
Last Modified: 2013-11-13
I want to write a program that using winsock to connect two computer together.

The server side can browser the client side hard disk.

At the moment, i can list out all the files in listbox.

My question is
I would like to know how to add icon next to all the file name.

For example:  data in list box

c:\windows
c:\test.txt
c:\text.doc
c:\joke.html

no necessary to use list box..

i want to display folder icon, text file icon, word icon and html icon next to those name.

as long as my windows can open those file, then my program will display its icon.

it is same as windows explorer.

please provide me the coding, thanks.
0
Comment
Question by:yongyih
[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
  • 8
  • 5
  • 3
  • +3
20 Comments
 
LVL 14

Expert Comment

by:ajexpert
ID: 7184951
Hi,
  Use list view instead of list box which supports images with every item in list view.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7184965
0
 
LVL 2

Author Comment

by:yongyih
ID: 7184969
it will list icon based on which type of file or not??
i need code to retrieve icon for related file..
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:yongyih
ID: 7184981
thanks for reply.. i try first..
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 7185110
Retrieving Both 16x16 and 32x32 Associated Icons Using SHGetFileInfo
http://www.mvps.org/vbnet/code/icon/icon1632simple.htm
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 7185124
nm, didn't see angel's post above...
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7185896
there is a control somwhere at net that does exactly what you want but i can't remember the url...
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7185903
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7185925
0
 
LVL 2

Author Comment

by:yongyih
ID: 7186792
still trying... thanks for reply.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7186982
Also, when you get a chance, please maintain these open questions:
I want to know how to pass data between JFrame Date: 10/17/2001 06:56AM PST  
http://www.experts-exchange.com/java/Q_20194481.html
Reading and Sending email using yahoo email account? Date: 07/02/2001 07:50AM PST  
http://www.experts-exchange.com/java/Q_20144566.html
How to draw 3D object using Java? Date: 06/28/2001 06:03PM PST
http://www.experts-exchange.com/java/Q_20143117.html
Create exe file for Java Application. Date: 05/08/2001 08:46PM PST
http://www.experts-exchange.com/java/Q_20115229.html
What is interorganization network and organization network? Date: 04/04/2001 09:38PM PST  
http://www.experts-exchange.com/networkgen/Q_20101901.html

Thanks,
Anthony




0
 
LVL 2

Author Comment

by:yongyih
ID: 7192557
i am busy these few days... i will try and let you guys know. sorry.. and thanks for reply.  ^_^
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 400 total points
ID: 7193394
yon, take a look at the sample from one of my posted links (http://www.mvps.org/btmtz/vbexplorer/):
http://www.mvps.org/btmtz/vbexplorer/vbexplorer.zip

If it is not what you want, then i don't know what you want!
cheers
0
 
LVL 2

Author Comment

by:yongyih
ID: 7205593
When i run your project, i received an File not found 'sortascending.ico' error here..

    Call ImageList_AddIcon(m_himl, LoadPicture("sortascending.ico"))
    Call ImageList_AddIcon(m_himl, LoadPicture("sortdescending.ico"))

0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7205947
Do you have any intention of maintainging these open questions:
I want to know how to pass data between JFrame Date: 10/17/2001 06:56AM PST  
http://www.experts-exchange.com/java/Q_20194481.html
Reading and Sending email using yahoo email account? Date: 07/02/2001 07:50AM PST  
http://www.experts-exchange.com/java/Q_20144566.html
How to draw 3D object using Java? Date: 06/28/2001 06:03PM PST
http://www.experts-exchange.com/java/Q_20143117.html
Create exe file for Java Application. Date: 05/08/2001 08:46PM PST
http://www.experts-exchange.com/java/Q_20115229.html
What is interorganization network and organization network? Date: 04/04/2001 09:38PM PST  
http://www.experts-exchange.com/networkgen/Q_20101901.html

Anthony
0
 
LVL 2

Author Comment

by:yongyih
ID: 7207319
hey acperkins, i am busy these few days.. that's why i only have time to reply this question.. no time to try the rest of link..

i will maintain other questions when i have time.
So, please stop sending this type of comment to me and spend your time to help the rest of people. thanks.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7207907
Yes but if you comment those lines, everuthing works fine.
Also, take the time to revie those questions that ACPerkins already told you.
It is in your best interest :)
Thanks for "A" grade.
0
 
LVL 2

Author Comment

by:yongyih
ID: 7209302
Sure i will maintains those questions..
thank you too.. at least you give me some solutions.. ^_^
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7211400
Thank you for maintaining your open questions.  Here are a couple that I believe you may have overlooked:
Problem related to VB and Crystal Report Date: 07/20/2002 02:24AM PST
http://www.experts-exchange.com/crystal/Q_20325818.html
(If you wish to delete the above question, post a message in Community Support)
Problem related to VB and Crystal Report. Date: 07/17/2002 03:52AM PST
http://www.experts-exchange.com/visualbasic/Q_20324308.html

Thanks,
Anthony
0
 
LVL 2

Author Comment

by:yongyih
ID: 7212034
i am still waiting answer for these two questions...(actually is same problem)

if still no answer, i will accept the first question and delete the one in crystal report section.

do you have any idea to solve that question?

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

705 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