How do I create an ico file of a single icon contained in a dll or exe file?
It's much more interresting if you succeed to place a 'WEP' to!
(c code required to load the dll as module)
I'm interrested if anyone has done this (not using an c compiler)
Daniel W. Brower heeft geschreven in bericht ...
> How do I create an ico file of a single icon contained in a dll or exe file?
Private Declare Function CopyIcon% Lib "User" (ByVal hInst%, ByVal hIcon%)
Private Declare Function DestroyIcon% Lib "User" (ByVal hIcon%)
Private Declare Function DrawIcon% Lib "User" (ByVal hDC%, ByVal X%, ByVal Y%, ByVal hIcon%)
Private Declare Function ExtractIcon% Lib "Shell" (ByVal hInst%, ByVal lpFile$, ByVal hIcon%)
But I can't seem to find the right mix to be able to assign an icon to a
Form.Icon, or a DragIcon, which is what I tried to do. Once assigned, it could
be saved using SavePicture.
I have been able to extract an icon from an exe or dll and assign it to a
button. If you think this will help e-mail me and I'll send you the code I
used.
Steve
>> How do I create an ico file of a single icon contained in a dll or exe
file?
>Tough question, I have been troubled by this for over a year! The APIs
>involved include:
>Private Declare Function CopyIcon% Lib "User" (ByVal hInst%, ByVal hIcon%)
>Private Declare Function DestroyIcon% Lib "User" (ByVal hIcon%)
>Private Declare Function DrawIcon% Lib "User" (ByVal hDC%, ByVal X%, ByVal
Y%, ByVal hIcon%)
>Private Declare Function ExtractIcon% Lib "Shell" (ByVal hInst%, ByVal
Quote:>But I can't seem to find the right mix to be able to assign an icon to a
>Form.Icon, or a DragIcon, which is what I tried to do. Once assigned, it
could
>be saved using SavePicture.
Steve Bonanno a crit dans le message ...
|I have been able to extract an icon from an exe or dll and assign it to a
|button. If you think this will help e-mail me and I'll send you the code I
|used.
YES
SEND it to me too, please
|I have been able to extract an icon from an exe or dll and assign it to a
|button. If you think this will help e-mail me and I'll send you the code I
|used.
YES
Send it to me too, please
If you are just trying to get and save the image, you can use an icon
editor such as IconForge. The trial download can be found at
http://www.cursorarts.com/ca_if.html or from other major on-line libraries.
This is extracted from a sample I got at
Use the API viewer to get the declares and constants
Public Const BASIC_SHGFI_FLAGS = SHGFI_TYPENAME _
Or SHGFI_SHELLICONSIZE Or SHGFI_SYSICONINDEX _
Or SHGFI_DISPLAYNAME Or SHGFI_EXETYPE
Dim shinfo As SHFILEINFO
hImgSmall = SHGetFileInfo(fName, 0&, shinfo, Len(shinfo), _
BASIC_SHGFI_FLAGS Or SHGFI_SMALLICON)
hImgLarge = SHGetFileInfo(fName, 0&, shinfo, Len(shinfo), _
BASIC_SHGFI_FLAGS)
pixSmall.Picture = LoadPicture()
pixSmall.AutoRedraw = True
pixLarge.Picture = LoadPicture()
pixLarge.AutoRedraw = True
r = ImageList_Draw(hImgSmall&, shinfo.iIcon, pixSmall.hdc, 0, 0,
ILD_TRANSPARENT)
r = ImageList_Draw(hImgLarge, shinfo.iIcon, pixLarge.hdc, 0, 0,
ILD_TRANSPARENT)
pixSmall.Picture = pixSmall.Image
pixLarge.Picture = pixLarge.Image
Art
> YES
> SEND it to me too, please
I left out the source to that code...
http://home.sprynet.com/sprynet/rasanen/vbnet/default.htm
1. Extract icon from dll into form.icon
I need to extract some icon's from a dll and use them in my aplication.
I can extract them into a picture object with ExtractIconA function from
shell32.dll into picture.image propertie.
Then i need to put them on form.icon propertie. How can i do that?
Regard
Jos
3. Extracting icon from exe or dll
4. Searching for spacebackgroundmaps!!!
5. Extract icon from exe or dll files
6. Wanted: MacRenderman Developer's CD
7. ICONS - CREATING ICON.DLL or ICON.EXE FROM *.ICO
8. Conflict between PM 6.52 and Suitcase 8.0
9. Extracting Bitmaps from resource dll
10. Extracting Jpeg from a DLL
11. Wanted: pre-compiled MESA DLL's for 3DFX (OPENGL32.DLL, GLU32.DLL, GLUT32.DLL)
12. Extracting icon images from .exe/.cab files
13. extract icon from file - transparency problem