Click to See Complete Forum and Search --> : use a hastable or an imagelist??


dubem
September 12th, 2002, 01:48 PM
Hi!,

I have several forms using about the same icons for the toolbar. Instead of having one imagelist in each form with the same icons, I want the icons to be loaded at startup and then pass through each form. I know how to load the icons at startup but I am wondering where I will store them.

1 - In a hastable, the hashtable object will be pass to the form in the constructor.
Cons: I have to iterate the toolbar buttons collection and then assign each icons.

2 - An imagelist, the imagelist object will be pass to the form in the constructor.
Pro: I only have to set the imagelist.
Cons: An imageList is a form control, I don't like tohave it in memory.

What do you think I should do?

Thank you