Introduction
Creating ImageLists is a very time consuming activity especially when one isn't using VS.NET.
ImageList Maker is a .NET powered wizard that will help developers create ImageList Assemblies.
Creating ImageLists with this wizard is a very easy and straight forward process.
The application creates a C# source file and when specified it also creates and compiles
an assembly.
System Requirements
- Microsoft Windows 95+ / NT4+
- Microsoft .NET SDK (version 1.0 release; not Beta 1, 2, etc)
- A humoristic attitude.
Screenshots:



Generated Source Code
This code is automatically compiled to an assembly DLL for you if you choose
the option in the wizard.
namespace MyNamespace
{
using System;
using System.Resources;
using System.Drawing;
using System.Windows.Forms;
using System.Collections;
using System.ComponentModel;
public class MyImageList
{
private ArrayList imgNames;
private ImageList _imageList;
public ImageList TheImageList
{
get
{
return(_imageList);
}
set
{
_imageList = value;
}
}
public ArrayList ImageNames
{
get
{
return imgNames;
}
}
public MyImageList()
{
_init();
}
public int GetIndex(string iname)
{
return imgNames.IndexOf(iname);
}
private void _init()
{
ResourceManager Rm = new ResourceManager(
"TSIML_MyImageList", GetType().Assembly);
_imageList = new ImageList();
_imageList.ImageSize = new Size(
(int) Rm.GetObject("IWIDTH"),
(int) Rm.GetObject("IHEIGHT"));
_imageList.TransparentColor =
(Color) Rm.GetObject("ITRANS");
_imageList.ColorDepth = ColorDepth.Depth32Bit;
imgNames = (ArrayList)Rm.GetObject("INAMES");
foreach(object name in imgNames)
{
_imageList.Images.Add(
(Image)Rm.GetObject((string)name));
}
}
}
}
How to use the output
Here is a code example to show you how to use the resulting source code by ImageList Maker
namespace TrueSoftware
{
using System;
using System.Windows.Forms;
using System.Resources;
using MyNamespace;
public class MyImageList_TestApp : Form
{
public MyImageList_TestApp()
{
Width = 320;
Height = 200;
Text = "MyImageList Test Application " +
"by TrueSoftware";
StartPosition = FormStartPosition.CenterScreen;
MyImageList imgMyImageList = new MyImageList();
ListView lvTestView = new ListView();
lvTestView.LargeImageList =
imgMyImageList.TheImageList;
foreach(object name in imgMyImageList.ImageNames)
{
lvTestView.Items.Add(
(string) name,
imgMyImageList.GetIndex((string)name));
}
lvTestView.Dock = DockStyle.Fill;
Controls.Add(lvTestView);
}
public static void Main(string[] args) {
Application.Run(new MyImageList_TestApp() );
}
}
}
Updates
| 22 Nov2002 |
|
| 09 Aug 2002 |
- Beta source code added to Imlmaker.zip
- Final source code with documentation in progress
|
| 01 June 2002 |
- Long directory names bug has been solved.
|
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