Groups | Blog | Home
all groups > vb.net > june 2004 >

vb.net : icon.save 16x16


Jo Franklin
6/21/2004 7:44:01 PM
I am using icon.save to save icon files I've extracted using ExtractIconEx.
when I save the large icon everything is fine, but when I save the small
icon it looks distorted, and has a black (not transparent) background. Any
ideas why?

Jo Franklin
6/22/2004 3:15:21 AM
ExtractIconEx(sFile, 17, IconPtrLarge, IconPtrSmall, 1)

myIcon = Icon.FromHandle(IconPtrLarge)


Dim iconFile As New IO.FileStream("C:\icon2.ico", FileMode.OpenOrCreate)

myIcon.Save(iconFile)

iconFile.Close()

myIcon.Dispose()

This code works fine. The 32x32 icon is saved properly, but if I change the
line to: myIcon = Icon.FromHandle(IconPtrSmall) - to get the 16x16 icon Then
save the file it has that black background and looks somewhat distorted.

[quoted text, click to view]

hirf-spam-me-here NO[at]SPAM gmx.at
6/22/2004 7:26:47 AM
* "Jo Franklin" <cracker1234@optonline.net> scripsit:
[quoted text, click to view]

That's hard to say without seeing any code...

--
Herfried K. Wagner [MVP]
hirf-spam-me-here NO[at]SPAM gmx.at
6/22/2004 8:39:00 PM
* "Jo Franklin" <cracker1234@optonline.net> scripsit:
[Problems saving small icons]

Did you have a look at this sample?

<URL:http://vbaccelerator.com/article.asp?id=4567>

;-)

--
Herfried K. Wagner [MVP]
AddThis Social Bookmark Button