How to convert a Bitmap to Icon at code level?


Author
Message
Ben Hayat
Ben Hayat
Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Here is where I'm running to this issue.



I have a "NotifyIcon" that at runtime, I need to change the icon. But I don't want to grab the icon from disk. So, I placed an "ImageList" and put my Icons in it.



Now when I try to assign one of those images to NotifyIcon.Icon, the compiler complains that the Image from Imagelist is not an "Icon".

notifyIcon1.Icon = imageList1.Images[0];



I've looked around and can't find a way to convert the image from Imagelist to Icon.



Any pointers?

Thanks!

..ßen
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ben Hayat - 17 Years Ago
StrataFrame Team - 17 Years Ago
Ben Hayat - 17 Years Ago
Paul Chase - 17 Years Ago
                     [quote][b]Paul Chase (07/13/2007)[/b][hr]Ben H,

Here is how...
Ben Hayat - 17 Years Ago
                         [quote]GetHIcon()[/quote] Nice, one Paul... I always forget about...
StrataFrame Team - 17 Years Ago
                             Thanks Ben ! Iwanted to make sure there was nogotcha that I didn't...
Paul Chase - 17 Years Ago
                                 [quote]Check out the trailers for Crysis...
StrataFrame Team - 17 Years Ago
                                     Hey Ben. Have you played the Halo3 beta?
Ivan George Borges - 17 Years Ago
                                         [quote]Have you played the Halo3 beta?[/quote] Oh, yeah, I racked up...
StrataFrame Team - 17 Years Ago
                                             [quote]Oh, yeah, I racked up about 140 games on the 3 weeks that it...
Ivan George Borges - 17 Years Ago
                                                 Nah, the beta only lasted for 3 weeks... they took it offline back on...
StrataFrame Team - 17 Years Ago
                                                     ... :crying:
Ivan George Borges - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search