473,804 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Image s[position] as Bitmap).GetHico n());





Thanks for any help !



Steph.
Apr 4 '06 #1
1 3841

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.Image s[position] as Bitmap).GetHico n());

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
6796
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 to do this I need to retrieve and save the images to disk in their native format. The problem is that the images are stored in Access as the OleObject type rather than binary. I cannot figure out how to pull these imagesfrom the database and...
1
2651
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
1652
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 my application to continue running in the background. Thanks Maz.
11
3924
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? Thanks in advance!
1
1851
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 that I drew on it in the editor (32x32). When I add the icon to the project, the icon does not display the figure on the form, but it does display in the Alt-Tab box, and it displays in the Project Properties page. Also, the icon does not display...
0
2592
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 works fine but the treeview icon appears to be 32x32 squashed to 16x16 instead of the proper 16x16 icon which looks much better.
2
1405
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 possible in VB.NET to see which formats are contained by an .ico file, and how to extract them? Thank you, James
1
2255
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
1697
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 and Stephan Lebans 'aDialogColor' function. I modified the function slightly to open the full color palette with CC_FULLOPEN + CC_RGBINIT and pass to the function the color that I want to set initially before calling ChooseColor. My issue is,...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10323
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.