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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top