Hi,
I think your approach is a little bit overcomplicated. The Add method
accepts a System.Drawing.Image, and System.Drawing.Bitmap is inherited from
System.Drawing.Image. So it should be sufficient to use the following code
(given the Bitmap property returns an instance of System.Drawing.Bitmap):
imageList2.Images.Add (picture.Bitmap);
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"frazer" <ic***@hotmail.com> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...
hi i have a set of bitmaps in an array.
and i want to add it to a imagelist so that i can show those images in my
treeview.
imageList2.Images.Add (Image.FromHbitmap (picture.Bitmap)); //cant use
this gives me an error
do i need to convert from bitmap to a memory stream?
thanx