A
Alan Gillott
I'm converting a VB6 project to 2005. I stashed Icons in an Imagelist that I
used to change the icon of a Form (and System Tray) depending on
circumstance - I confess Red to Green and Viceversa - VB2005 won't let me do
this and I can't quite get my head around where I can stash my Icons. I
suspect the resource area but it doesn't offer me Icon as a format, and i
don't want to trial and error 8 or more times 'till I get it right.
Here's my bad code:
Me.Icon = ImageList1.Images.Item("Green")
Which errors out with:
Error 3 Value of type 'System.Drawing.Image' cannot be converted to
'System.Drawing.Icon'.
Please advise.
A
used to change the icon of a Form (and System Tray) depending on
circumstance - I confess Red to Green and Viceversa - VB2005 won't let me do
this and I can't quite get my head around where I can stash my Icons. I
suspect the resource area but it doesn't offer me Icon as a format, and i
don't want to trial and error 8 or more times 'till I get it right.
Here's my bad code:
Me.Icon = ImageList1.Images.Item("Green")
Which errors out with:
Error 3 Value of type 'System.Drawing.Image' cannot be converted to
'System.Drawing.Icon'.
Please advise.
A