Click here to Skip to main content
15,354,171 members
Articles / Programming Languages / C#
Posted 22 Jul 2003


54 bookmarked

A better way to select images for your ImageList

Rate me:
Please Sign up or sign in to vote.
4.82/5 (15 votes)
22 Jul 20032 min read
A design time control that makes it easier to add/remove images to an ImageList on a Form

Image 1


ImageListAssigner gives you a way to add/remove images to an ImageList on a form. It can browse for folders, display images and assign your selection to the ImageList. The ImageListAssigner is to be used at design-time only and not at run-time.


You have to use the WinLib.Controls namespace which contains :-


ImageListAssigner uses some constants defined in this class to remember your settings. It contains registry keys, locating where ImageListAssigner saves the settings.


The component links your ImageList to the ImageListAssignerSelector class.


A WinForm called by ImageListAssigner class, the form will browse your specified folder for images or directories, display images (currently uses *.BMP as file extension). It's a replacement for ImageList's ImageCollection editor in VS.NET.

GlyFx (folder)

I have included GlyFx folder, which contains the Common, DB and Core image sets. GlyFx is copyrighted PerthWeb Pty Ltd ( ). Some included images are in disabled state, for examples only, and for not re-distribution.

Using the component

A brief description above, ImageListAssigner needs for design-time, you can remove ImageListAssigner after images in your ImageList done. ImageListAssigner will display a short message in run-time mode to notify you it should be removed.

First, add an ImageList component to your Form, and also add ImageListAssigner to the same form. Then, select ImageListAssigner and open Properties editor window, and on the Destination property, select your last added ImageList.

Now, set true value for ShowDesign property. This action will bring up the ImageListAssignerSelector form. If this is first time, click on "Look in..." at the top most area of the dialog and select a directory which contains images. You can select GlyFx directory if you does not have any image folder. Select any folder that shows on folder tree, if it contain images, the images will show. Double-Click on image to select/de-select. Right-Click for more options.

Finally, click on Apply link button to save your selected images to the ImageList.

Wait! If you open ImageList's ImageCollection editor you will see no changes. I don't known how to notify VS.NET to update the ImageList resources (was changed by ImageListAssigner). But, any control that uses the ImageList will see all its images which was added by ImageListAssigner. To see changes of ImageList, save/close form and re-open it.

Demo project

Please open Test project included in ZIP file.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Ngan Pham
Web Developer
Vietnam Vietnam
No Biography provided

Comments and Discussions

General[Message Removed] Pin
nompel4-Oct-08 2:19
Membernompel4-Oct-08 2:19 
GeneralOne ImageList Pin
akorolev1017-Jul-05 22:48
Memberakorolev1017-Jul-05 22:48 
QuestionHow do you install it? Pin
Will L Pittenger25-Oct-04 14:38
MemberWill L Pittenger25-Oct-04 14:38 
GeneralUITypeEditor Pin
leijtens27-Jul-04 20:18
Memberleijtens27-Jul-04 20:18 
GeneralRe: UITypeEditor Pin
ganegaar4-Aug-04 1:06
Memberganegaar4-Aug-04 1:06 
GeneralRe: UITypeEditor Pin
lanxue15-Aug-04 2:25
Memberlanxue15-Aug-04 2:25 
General.NET 1.0 Version Pin
Hamid Qureshi7-Jan-04 17:53
MemberHamid Qureshi7-Jan-04 17:53 
Hi Ngan Pham!

Is it possible for you to post a .NET 1.0 version as well. I tried to convert it my self but a ResX failure occured. If its possible for you please post a .NET 1.0 version as well

Thanx in advanceSmile | :)
GeneralRe: .NET 1.0 Version Pin
Ngan Pham7-Jan-04 23:52
MemberNgan Pham7-Jan-04 23:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.