<p>I have a <code>TreeView</code> windows forms control with an <code>ImageList</code>, and I want some of the nodes to display images, but the others to not have images.</p>

<p>I <em>don't</em> want a blank space where the image should be.  I <em>don't</em> want an image that looks like the lines that the TreeView would draw if it didn't have an ImageList.  How do I get it to draw images for some items and not others, without resorting to clumsy hacks like that?</p>

I tried this once and I don't think it is possible.
If you try to set both
```
ImageKey
```
and
```
ImageIndex
```
to "not set" values the control just defaults
```
ImageIndex
```
to 0. The following code:
```
```
treeView.ImageKey = "Value";
Debug.WriteLine(treeView.ImageIndex);
treeView.ImageKey = null;
Debug.WriteLine(treeView.ImageIndex);
treeView.ImageIndex = -1;
Debug.WriteLine(treeView.ImageIndex);
```
```
Produces output:
```
```
-1
0
0
```
```
This kind of tells you that the control developers wanted to make sure that there was always a default image. That just leaves you with the hack options I'm afraid.