Changing icons at runtime

  • Thread starter Thread starter O.A.Haugum
  • Start date Start date
O

O.A.Haugum

Hi



I want to use a lot of icons in panels in a status bar. The icons shall show
the current status of operations and has to be changed programmatically.

Is it possible to store the icons in the application in the same way as you
store images in an image list? I prefer not get the icons from files.



Odd Anders
 
O.A.Haugum said:
I want to use a lot of icons in panels in a status bar. The icons
shall show the current status of operations and has to be changed
programmatically.

Is it possible to store the icons in the application in the same way
as you store images in an image list? I prefer not get the icons
from files.

An Imagelist can not store Icons. Therefore you can not directly assign the
icons from an imagelist to the Icon property of a StatusbarPanel without
conversion.

You can store the icons as resources in the assembly and load them at
runtime:
http://msdn.microsoft.com/library/en-us/vbcon/html/vboriUsingResources.asp


Armin
 
Back
Top