473,698 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extract Icon By IconIndex?

Hi all,

Does .NET provide any native API calls to extract .DLL/.EXE icon files
based on IconIndex?

Is there a way to enumerate through all the icons in an assembly (.NET or
Native code assemblies)?

Thanks!
Feb 11 '07 #1
2 1874
"Spam Catcher" <sp**********@r ogers.comschrie b:
Does .NET provide any native API calls to extract .DLL/.EXE icon files
based on IconIndex?

Is there a way to enumerate through all the icons in an assembly (.NET or
Native code assemblies)?
<URL:http://dotnet.mvps.org/temp/Win32Res.zip>

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

Feb 11 '07 #2
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.atwrote in
news:ug******** ******@TK2MSFTN GP02.phx.gbl:
"Spam Catcher" <sp**********@r ogers.comschrie b:
>Does .NET provide any native API calls to extract .DLL/.EXE icon
files based on IconIndex?

Is there a way to enumerate through all the icons in an assembly
(.NET or Native code assemblies)?

<URL:http://dotnet.mvps.org/temp/Win32Res.zip>
Thank you!

I also found a good example on CodeProject - I'll post something when I've
completed my miniproject.

Thanks :)
Feb 11 '07 #3

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

Similar topics

4
8593
by: Mehdi Mousavi | last post by:
Hi, I need to know how to extract a specific icon (32x32 for instance) from an icon file that contains more than one icon size? Any help would be highly appreciated, Cheers. Mehdi
4
4625
by: kurotsuke | last post by:
Can anybody tell me how I can call the Pick Icon Dialog from C#? I couldn't find any example. Thanks.
6
10509
by: Mohammad-Reza | last post by:
Hi I want to extract icon of an exe file and want to know how. I look at the MSDN and find out that I can use ExtractIconEx() Windows API but in there are some changes to that api in c# I made those changes like this : public static extern uint ExtractIconEx( string szFile,
6
10036
by: yxq | last post by:
Thank Armin Zingler, the codes below work well! But i want to put the icon into Picturebox1 instead of the Form1, how to do? the code ************************** If retval <> 0 Then Dim g As Graphics Dim ico As Icon Dim hIcon As IntPtr ' handle to the icon once it is extracted hIcon = ExtractIcon(VB6.GetHInstance, iconfile, iconindex)
16
7407
by: Phil Hey | last post by:
Hi, I can change the icon for a folder by right clicking on it > going to the customize tab > and selecting Choose Picture. Does anyone know if it is possible to do this programmatically from a windows forms application?
5
3163
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...
6
11000
by: Udi | last post by:
Hi, I have an imagelist initialized in design time with several icons files (.ico). However, when I need to extract an icon (Image) from the Imagelist, I can't convert it back to an icon: statusBarPanel1.Icon = imageList1.Images; // cast/as don't work // Cannot convert type 'System.Drawing.Image' to 'System.Drawing.Icon' What am I mising here?
0
1680
by: yxq | last post by:
Hello, I use the API ExtractIcon to get icon from Shell32, but the returned icon lost alpha channel, how get back the alpha channel? thank you. ********************************************************************************************** Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Int32, ByRef phiconLarge As Int32, ByRef phiconSmall As Int32, ByVal nIcons...
0
1374
by: Frank | last post by:
If I have an icon file that contains one icon ExtractIconEx tells me there is one there. If the file contains 1 32x32 icon and one 16x16 icon ExtractIconEx still tells me there is one. I need to know how many icons of each size is in the file. I want to extract the icons as they exist in the file. That is, if there is a 17x17 and a 22x22 icon in the file I want to extract
0
8674
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
9157
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
8895
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
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7728
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...
0
5860
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
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
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.