tags:

views:

15

answers:

1

Hello guys,

I need help on how to extract the various images from an icon file ie 256 x 256, 48 x 48, 32 x 32, 24 x 24, 16 x 16 etc.

Am a vb6 and vb.net average programmer, and would be ok if help comes from any of the programming languages i mentioned

thanks

A: 

ExctactIcon or ExtractIconEx get icons from a file, returning icon handle(s).

DrawIcon or DrawIconEx draw them using the handles.
Alternatively, Bitmap.FromHICON in .net creates an image from an icon handle.

DestroyIcon frees resources allocated by ExtractIcon / ExtractIconEx.

GSerg
The reference you gave me was for vb.net, is it possible i use this in vb6, i don't have the declaration for the api
Smith
@Smith See [my answer](http://stackoverflow.com/questions/1071171/where-can-i-find-a-list-of-windows-api-constants-in-a-none-net-enviroment/1071406#1071406) to [this question](http://stackoverflow.com/questions/1071171/where-can-i-find-a-list-of-windows-api-constants-in-a-none-net-enviroment).
GSerg