473,394 Members | 1,944 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,394 software developers and data experts.

Icon in ImageList back to a USABLE Icon format...



Hi,

I load Icons in an ImageList.To do that I have to convert the Icons in the Bitmap format.



But HOW can I get My Icon back in a Usable Icon format ?



I tried the code below, but the Icons are drawn in a black square. (no more transparent color on the edges of the icons.)



Icon MyIcon = Icon.FromHandle((imgList.Images[position] as Bitmap).GetHicon());





Thanks for any help !



Steph.
Apr 4 '06 #1
1 3804

Steph. wrote:
Hi,

I load Icons in an ImageList.To do that I have to convert the Icons in the Bitmap format.

But HOW can I get My Icon back in a Usable Icon format ?

I tried the code below, but the Icons are drawn in a black square. (no more transparent color on the edges of the icons.)

Icon MyIcon = Icon.FromHandle((imgList.Images[position] as Bitmap).GetHicon());

Thanks for any help !


I don't know for sure, but I think you're out of luck. The ImageList
(as its name suggests) holds Images - an Icon isn't an Image, so when
you convert an Icon to an Image, you lose information.

Maybe you can separately keep a collection of your Icons.

--
Larry Lard
Replies to group please

Apr 4 '06 #2

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

Similar topics

4
by: RichG | last post by:
I have an Access database/forms application that has images stored in it. I need to develop a new VB that utilizes Oracle or the file system as the underlying storage for these images. In order...
1
by: Alice | last post by:
Hi all How can i change the status bar icon for my website Or The icon shown in user's Task Manager for the browser process fetching my website Thanks in Advance Alic
1
by: Maziar Aflatoun | last post by:
Hi, Can someone please tell me how I can on a click of a button minimize my Win form application and show my application icon under toolbars->desktop icons (bottom right of the screen). I want...
11
by: Juan Romero | last post by:
Hey guys, I have an ImageList control that stores my icons. What I need to do is find out if the icon at hand already exists in the ImageList so I dont enter it twice. How can I do that? ...
1
by: Rich | last post by:
Hello, I have created icons before with icon editor that comes with VS2003 without any issues. Today I created another icon for my VB.Net app. But this .ico file is not displaying the figure...
0
by: Mark | last post by:
Hi Folks (VS .NET 2005 on Windows XP...) I'm using Drawing.Icon.ExtractAssociatedIcon to extract the icon from a filepath etc. to be added to an imagelist used by a treeview. Everything...
2
by: James Arnold | last post by:
I am building a program which requires the selection of a certain icon format specified by the user. For example, they open "Test.ico" which contains 16x16, 24x24 and 32x32 icon sizes. How is it...
1
by: hiteshrane | last post by:
Can anybody tell me how to convert milisecond back to date format, the date is converted to milisecond by using mktime function.
0
by: KW | last post by:
I created custom toolbar icons that look and function similar to the standard MS Access Fill/Back Color and Fill/Fore Color toolbar icons. My custom icons call a function that uses the Terry Kreft...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.