473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

icon.save 16x16

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?
Nov 20 '05 #1
3 8029
* "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/>
Nov 20 '05 #2
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/>

Nov 20 '05 #3
* "Jo Franklin" <cr*********@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]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ed Isenberg | last post by:
I notice that a lot of Web pages have an icon that is displayed preceding the URL in the place in the browser where the URL is displayed. When I bookmark or add this to Favorites the icon is also...
1
by: Brian Henry | last post by:
I have an icon in my app as an embeded resource.. i am accessing it through the assemblies getmainfestresourcestream method of the assembly. The icon has a 32x32 and a 16x16 icon in the same icon...
3
by: Tony Lugg | last post by:
I have an application with a document management form. When users add documents to the form, I call the API function SHGetFileInfo to get the associated large and small icons for the file. These...
0
by: Dennis | last post by:
I give up...I've searched and tried many things and can get the icon to a bitmap and resized from 32x32 to 16x16. However, I can't seem to get the new 16x16 bitmap converted back to an icon for...
3
by: Brian Henry | last post by:
I have icons which contain 16x16, 24x24, and 32x32 icons in the single file and it is embedded as a resource... I need to get a 16x16 icon only out of it, how would i go about doing that? ive tried...
0
by: Mark | last post by:
Hi I tried to find a solution to this a while back and more surfing today has yielded nothing usefull. I am using "extractAssociatedIcon" to get icons for a listview containing files etc....
3
by: SveinErik | last post by:
Hi, I'm trying to find a method to save bmp, jpg and png files as ico files, 16x16 size. I have managed to convert and save bmp files to icon, but only in 32x32 size. I can't figure out how to save...
6
by: Laurent Navarro | last post by:
Hello, I have an EXE (.NET assembly) file with an icon which has 8 formats (128x128, 96x961, ..., 24x24 and 16x16). I would like the extract the 128x128 sized icon only to display it on a...
1
by: =?Utf-8?B?U3RldmVU?= | last post by:
I have a structure that contains both 32x32 and 16x16 icons plus some text. I want to write all this to an XML file so that I can recover the icons later in an application. Can someone tell me how...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.