Icon: Extract icon and save it as ico-file 
Author Message
 Icon: Extract icon and save it as ico-file

Hi!

Is it possible with some API-Calls to save a extracted  icon to
a ico-file? What I'm trying to do is to extract icon(s) from a
.exe/.dll-file and save to .ico file(s). Or convert bitmaps to icons.
I need to code this myself, so all these available utilities will not help
me out :-(.

Suggestions, links, ocx, or code will be apreciated!

I found Q104570 ("Reading and Writing Icons from ExtractIcon") at Microsoft
KB, but this in C++ and I'm not sure if this is what I'm looking for.

Regards,

Oddbjorn Bersas

Please reply to this NG only!



Fri, 04 Jan 2002 03:00:00 GMT  
 Icon: Extract icon and save it as ico-file
Hi Oddbjorn.  See if this helps:

Icon Explorer Utility (Source Included)
http://vbaccelerator.com/codelib/gfx/iconex.htm

'-------
galen



Fri, 04 Jan 2002 03:00:00 GMT  
 Icon: Extract icon and save it as ico-file
Hi Oddbjorn,

after you extracract icon. Use DrawIcon function and
draw it to PictureBox (Name: Picture1; AutoRedraw=True; size 32x32pixels).
After it is drawn call SavePicture Picture1, "myicon.ico"

'== sample code==
micon = ExtractIcon(App.hInstance, "c:\windows\calc.exe", 0)
DrawIcon Picture1.hdc, 0, 0, micon
DestroyIcon micon
Picture1.Refresh
SavePicture Picture1.Image, "c:\file.ico" ' the icon size is 32x32, if the
picture if large than 32x32 the result icon is picture compressed to 32x32
'=====end======

The declarations of the functions you will find in API veiwer

that's all, good luck

Jan
=============================================
jK's Visual Basic page, http://freeweb.coco.cz/jankudr
=============================================

=============================================


Quote:
> Hi!

> Is it possible with some API-Calls to save a extracted  icon to
> a ico-file? What I'm trying to do is to extract icon(s) from a
> .exe/.dll-file and save to .ico file(s). Or convert bitmaps to icons.
> I need to code this myself, so all these available utilities will not help
> me out :-(.

> Suggestions, links, ocx, or code will be apreciated!

> I found Q104570 ("Reading and Writing Icons from ExtractIcon") at
Microsoft
> KB, but this in C++ and I'm not sure if this is what I'm looking for.

> Regards,

> Oddbjorn Bersas

> Please reply to this NG only!



Fri, 04 Jan 2002 03:00:00 GMT  
 Icon: Extract icon and save it as ico-file

Quote:
> Hi Oddbjorn.  See if this helps:

> Icon Explorer Utility (Source Included)
> http://vbaccelerator.com/codelib/gfx/iconex.htm

> '-------
> galen

Tanks alot!
It was a great help for my project.

Regards,

Oddbjorn Bersas



Sat, 05 Jan 2002 03:00:00 GMT  
 Icon: Extract icon and save it as ico-file
ok but your file in not a real ico, it' s a bmlp file !
look at the size (not 766 bytes)


Quote:
> Hi Oddbjorn,

> after you extracract icon. Use DrawIcon function and
> draw it to PictureBox (Name: Picture1; AutoRedraw=True; size 32x32pixels).
> After it is drawn call SavePicture Picture1, "myicon.ico"

> '== sample code==
> micon = ExtractIcon(App.hInstance, "c:\windows\calc.exe", 0)
> DrawIcon Picture1.hdc, 0, 0, micon
> DestroyIcon micon
> Picture1.Refresh
> SavePicture Picture1.Image, "c:\file.ico" ' the icon size is 32x32, if the
> picture if large than 32x32 the result icon is picture compressed to 32x32
> '=====end======

> The declarations of the functions you will find in API veiwer

> that's all, good luck

> Jan
> =============================================
> jK's Visual Basic page, http://freeweb.coco.cz/jankudr
> =============================================

> =============================================


> > Hi!

> > Is it possible with some API-Calls to save a extracted  icon to
> > a ico-file? What I'm trying to do is to extract icon(s) from a
> > .exe/.dll-file and save to .ico file(s). Or convert bitmaps to icons.
> > I need to code this myself, so all these available utilities will not
help
> > me out :-(.

> > Suggestions, links, ocx, or code will be apreciated!

> > I found Q104570 ("Reading and Writing Icons from ExtractIcon") at
> Microsoft
> > KB, but this in C++ and I'm not sure if this is what I'm looking for.

> > Regards,

> > Oddbjorn Bersas

> > Please reply to this NG only!



Sun, 06 Jan 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Here is how to save Extracted Icon to ICO file

2. Extract Icon, save as .ico

3. How can I save extracted icons as single .ico

4. HOWTO extract icon to ico file?

5. Save Image as .ico Icon File?

6. save icons to .ico file?

7. Save Icon from .EXE file to .ICO

8. Saving Icons from EXEs to ICO files

9. Saving Icons to an ico file

10. Extracting Icons from Exe's Dll's Ico's into a ListImage Control

11. Icons on Menus and Extract Icons from Files?Message-ID: <3f

12. ICO-Icons or BMP-Icons wanted !!!

 

 
Powered by phpBB® Forum Software