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.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2j*************@uni-berlin.de...
* "Jo Franklin" <cr*********@optonline.net> scripsit: 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?
That's hard to say without seeing any code...
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>