Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

Why does adding images to an ImageList in the Designer cause them to lose their alpha channel?

It looks like the ImageList editor loses the transparency when it does some internal copy or clone of the images. However, it seems that it does work when you add the images in code to the ImageList.

One workaround (not so tidy) is to add the images to the ImageList in the design time (so that your design-time will be closer to the runtime) and then clear that ImageList and refill it with the images again in code.

For information on how to add images to your project and retrieve them at runtime, see How do I load an embedded resource, such as a bitmap (BMP) file, icon, etc.? in this FAQ.

Contributed from George Shepherd's Windows Forms FAQ