This strikes me as odd - I create a small in-memory bitmap, and draw a single character with a background color on it. I then transfer this into an Imagelist control. However, when I transfer the imagelist.image(x) to a location in a picturebox, only the background color of the image shows up.
I know that the bitmap was created correctly, because if I use "bmp1.save(filename)" then take the file and read it into an image ("dim g as image = image.fromfile(filename)")
then load g into the imagelist, it works great.
Can anyone tell me why it doesn't transfer properly to the imagelist unless I save it to disk and read it back? Thanks!!
Dim bmp1 As New Bitmap(CellWidth, CellHeight, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
For i = 1 To CellWidth
For l = 1 To CellHeight
'draw the '1's' as black
If Mid$(CellString(i), l, 1) = "1" Then
bmp1.SetPixel(i - 1, CellHeight - l, Color.Black)
bmp1.SetPixel(i - 1, CellHeight - l, Color.DarkGoldenrod)