The imagelist does not play nice with Alpha. Icons are generally OK, but it
depends on the icons format.
Load the images into the imagelist at runtime and you will get better
results, but the alpha will still be slightly bluish.
You'll also notice that the images in the imagelist only play nicely with
some controls, set a labels image to one of the imagelist alpha images and
you will really see ugly results.
As a workaround you can create icons from the png images at runtime and then
add them to the imagelist(labels still wont like them).
\\\
Dim ico As Icon
Dim bmp As New Bitmap("someimage.png")
ico = Icon.FromHandle(bmp.GetHicon)
ImageList1.Images.Add(ico)
bmp.Dispose()
ico.Dispose()
///
It would probably be better to add the pngs as Embedded Resource rather than
have them distrubuted seperately.
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
""Peter Huang" [MSFT]" <v-******@online.microsoft.com> wrote in message
news:qr**************@cpmsftngxa10.phx.gbl...
Hi Mitchell,
Have you tried to set the ImageList's ColorDepth to 32bit and imagesize to
a large one(e.g. 32,32) which may make the icon more "nice"?
Also since the icon is usually 32x32 or even 16x16 pixels, which have
little pixels to present the image, so if we add a large picture into the
imagelist as a icon which may cause the icon distortion.
If you still have any concern, please feel free to post there.
Best regards,
Perter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.