Saving A Picture Box as An Icon
Posted on 1997-04-24
I need to save a PictureBox as an Icon. What happens is I load an Icon from a DLL or EXE using the ExtractIcon and DrawIcon API calls just like below:
Iconh = ExtractIcon(hModule, IconFilename$, Count)
CurrentIcon = DrawIcon(pbIcons(Count).hdc, 0, 0, Iconh)
the thing is I now want to save that as an ICON File... I have tried the SavePicture but that doesn't work. Everything I have seen tells me to see ICONWRKS that came with Visual Basic 3.0. After looking at that I
determined that what they are doing is a bit different. They are loading the Icon from a .ICO File and then they use the SavePicture to save it which will work just fine, only problem is I am not loading the icon from a file via (LoadPicture)....