473,761 Members | 7,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get the Icon for a file type?

Hi,

In my application I need to list some files (a little bit like in windows
explorer), and I wan't to show next to each file the right Icon, as used in
windows explorer. how can i find which Icon is used for each file-type, and
use that icon to be shown in my application?

Thanks a lot in advance,

Pieter
Jul 22 '05 #1
2 1349
"DraguVaso" <pi**********@h otmail.com> schrieb:
In my application I need to list some files (a little bit like in windows
explorer), and I wan't to show next to each file the right Icon, as used
in
windows explorer. how can i find which Icon is used for each file-type,
and
use that icon to be shown in my application?


Getting File Icons Using The Shell
<URL:http://vbaccelerator.c om/article.asp?id= 4302>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 22 '05 #2
Thanks, but I get the impressions when using the Shell it shows only the
32x32 and the 16x16-icons. how can I get the other formats (24x24 and
48x48)?
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OT******** ******@TK2MSFTN GP10.phx.gbl...
"DraguVaso" <pi**********@h otmail.com> schrieb:
In my application I need to list some files (a little bit like in windows explorer), and I wan't to show next to each file the right Icon, as used
in
windows explorer. how can i find which Icon is used for each file-type,
and
use that icon to be shown in my application?


Getting File Icons Using The Shell
<URL:http://vbaccelerator.c om/article.asp?id= 4302>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1764
by: Bernie Yaeger | last post by:
I now know how to gather the file type icons and I'm able to use them in a listview. But a listbox does not have a .smallimagelist or .largeimagelist member, so I don't know how to translate that so that I have the icon + the string in a listbox. Is this possible, and if so, can you give me some idea how to go about it. Thanks for any help. Bernie Yaeger
8
2877
by: Ed Isenberg | last post by:
I notice that a lot of Web pages have an icon that is displayed preceding the URL in the place in the browser where the URL is displayed. When I bookmark or add this to Favorites the icon is also displayed at the left of the name of the page. How do I do this? I am using Frontpage 2002, but know how to edit HTML manually. Thanks,
8
2282
by: Adrian | last post by:
How do I put an icon on a form using code? Thank you.
3
7075
by: Giuseppe Pezzella | last post by:
Hi In Windows every file have yours icon, so: how I get them ( Extension and Icon) and save in a imageList for use later in a ListView? In VB6 was SHGetFileInfo. In VB.NET? How I can obtain a CDROM letters? (D:/, E:/ ecc.)
6
3763
by: Lespaul36 | last post by:
From what I have read, there isn't really a converter to icon format..it becomes a png file. I tried: 1: Dim bmp As Bitmap = CType(Bitmap.FromFile("C:\myfolder\file.bmp"), Bitmap) 2: Dim ico As Icon = Icon.FromHandle(bmp.GetHicon()) 3: Dim file As FileStream = New FileStream("C:\myfolder\file.ico",FileMode.OpenOrCreate) 4: ico.Save(file) 5: file.Close()
15
3645
by: kurt sune | last post by:
Anybody has a tip of where to find info/example how to retrieve an icon from a .RESX-file? /k
5
3172
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the database. Therefore the file doesnt really exist on the user's hard drive. All the file extracting techniques require that I have the actual file on the drive in order to get an icon for it. There is a workaround for this: i could create dummy files with...
0
2982
by: Mythran | last post by:
I wrote some code that is supposed to enumerate through the specified file's win32 resources and return a string-array of all icon names. When it runs, it returns a string-array with a bunch of numbers in sequential order (1-55 when ran against iexplore.exe). When I open up iexplore.exe in Visual Studio, I see 23 icons. Each icon has 1 or more sizes of the icon...I'm assuming that there are, in fact, 55 icon resources in iexplore.exe,...
2
4567
by: Dennis | last post by:
I have about 50 images in my application as "embedded resources". They are Icon size (16x16 and 24x24 and 32x32). I can use either the bitmap version or convert them to Icons. Either way seems to work ok (I make the color of the upper left pixel in the bitmap's the transparent color). I noted that the Icons take up 25k and the bitmaps only 1k). Which would be the recommended way to go, i.e., icons or bitmaps in my imagelist? Any...
1
2431
by: iwdu15 | last post by:
hi, how can i get the icon associated with a certain file type? thanks -- -iwdu15
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.