PC Review


Reply
Thread Tools Rate Thread

How to get the Symbol/Icon associated with a file or directory name

 
 
Alexander Ke▀ler
Guest
Posts: n/a
 
      15th Oct 2004
Hi,

I want to programm some kind of Explorer like the Windows Explorer.
And I want to know how can i get the same Icons/Symbols for the files and
directories like the Windows Explorer uses.

Example:

The Icon for the Desktop.

With the Command:
Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
I can get the folder where the Windows Desktop is located.

But how can I get the standart icon for the desktop?


 
Reply With Quote
 
 
 
 
Dennis MyrÚn
Guest
Posts: n/a
 
      15th Oct 2004
Unfortunately, I think you will need to use Win32 API for that.
In shell32.dll there is SHGetFileInfo.





--
Regards,
Dennis JD MyrÚn
Oslo Kodebureau
"Alexander Ke▀ler" <(E-Mail Removed)> wrote in message
news:cko62r$j03$(E-Mail Removed)-kl.de...
> Hi,
>
> I want to programm some kind of Explorer like the Windows Explorer.
> And I want to know how can i get the same Icons/Symbols for the files and
> directories like the Windows Explorer uses.
>
> Example:
>
> The Icon for the Desktop.
>
> With the Command:
> Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
> I can get the folder where the Windows Desktop is located.
>
> But how can I get the standart icon for the desktop?
>



 
Reply With Quote
 
 
 
 
Julijan Sribar
Guest
Posts: n/a
 
      15th Oct 2004
"Alexander Ke▀ler" <(E-Mail Removed)> wrote in message
news:cko62r$j03$(E-Mail Removed)-kl.de...
> Hi,
>
> I want to programm some kind of Explorer like the Windows Explorer.
> And I want to know how can i get the same Icons/Symbols for the files and
> directories like the Windows Explorer uses.
>
> Example:
>
> The Icon for the Desktop.
>
> With the Command:
> Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
> I can get the folder where the Windows Desktop is located.
>
> But how can I get the standart icon for the desktop?
>



Hello Alexander,

You'll have to use WinApi's SHGetFileInfo method. Check these:

http://support.microsoft.com/?kbid=319350

http://www.codeguru.com/Csharp/Cshar...cle.php/c4261/

Note that for retrieving icons for individual files, it is much faster to
use filename extension since it will fetch icons from the shell icon cache.

HTH.

Regards,

Julijan


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I reveerse name order last name, first name to first name, last name Don Smith Microsoft Excel Discussion 9 29th Nov 2006 10:55 PM
Active directory: Get users associated with groups Mark Microsoft Dot NET 3 15th Mar 2005 08:25 AM
Upon receipt of email, Outlook XP changes Contact Sender name to first Contact with the email address associated with the Contact name Paul Billings Microsoft Outlook Contacts 1 11th Nov 2004 11:10 AM
How to get the Symbol/Icon associated with special directory or file Alexander Ke▀ler Microsoft C# .NET 7 16th Oct 2004 09:41 PM
Get file name of associated aspx file Sacha Korell Microsoft ASP .NET 4 7th Jan 2004 10:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:38 PM.