By WebOsPublisher
Windows Forms
How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Index ‹ Windows Forms ‹ Windows Forms General
Author
Message
mohdtmn
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
Hello ..
I Use ExtractAssociatedIcon To Extract Icons from exe files ..
but i want to know how to use it to extrcat the second and thered and forth and fifth icon from exe or dll icon ..
because this method is extracting the first icon ..
i use it like this ..
Me.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:\Windows\Explorer.exe")
I Tried To Use it like this but it didn't work :
Me.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:\Windows\Explorer.exe 5")
Me.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:\Windows\Explorer.exe, -5")
Thanks , with best regards ..
Windows Forms22
sangminny
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
hello mohdtmn
this will be good sample
codeproject.com/dotnet/Extracting_Embedded_Image.asp
mohdtmn
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
thanks for your replay ..
but this was not helpful ..
It Can't work with all files ..
for examble i tried to open :
c:\windows\explorer.exe
c:\windows\system32\shell32.dll
it says : the specified file is not a .net assembely ..
and it's made only to take icons from .net Programs only !!
waiting for a solution ..
regards , and thanks
Wang Chi
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
There is a API to extract icon, you can try. To call this API, you need import shell32.dllHICON ExtractIcon(
HINSTANCE hInst,
LPCTSTR lpszExeFileName,
UINT nIconIndex
);
AndrewVos
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
I have a bit of code that uses windows ImageList cache, but it's way to big to put here.
Contact me at andrew(dot)vos(at)gmail.com and I'll send you the source... (It's in vb.net)
It can extract small, medium and large icons from associated files.
Oh wait a minute, from exe files this will only extract the associated icon
sorry.
Dylan Morley
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
Check out Steves' Icon Extractor utility, really nice implementation...
vbaccelerator.com/home/NET/Utilities/Icon_Extractor/article.asp
mohdtmn
Posted: Windows Forms General, How To Extract Icons From Exe Or Dll Files Using ExtractAssociatedIcon ??
Top
Wang Chi how to do it in vb.net i really tried ..
AndrewVos I Sent you an e-mail
Dylan Morley That's a very nice sample , but it's in c language also it's made for vs 2002 and when i converted it to vs 2005 the project is full with problems ..
thanks guys for help ..
regards .
Index ‹ Windows Forms ‹ Windows Forms General