Using VS2005 and C#.
Having a button in a form and an image from a resource, the image does not have transparency.
How can I have transparency when assigning the image from the IDE ?
Thank you.
Using VS2005 and C#.
Having a button in a form and an image from a resource, the image does not have transparency.
How can I have transparency when assigning the image from the IDE ?
Thank you.
I don't really understand what you are asking. You can use an image with transparency on a button as long as the image type you are using supports transparency - such as .png.
Edit: I read your question again and it is still confusing, but maybe you meant to say that you want to add transparency to the image? If so, you would have to use an image editor to add the transparency and save it in a format that supports this. Paint.Net is a good free tool for this.
Open the image in an image editor (Paint.NET and GIMP are free) and add the transparencies wherever you need to. It will all work once the image actually has transparent pixels. You can also use a couple mnethods of teh Bitmap class to do this programmatically:
Bitmap b = Properties.Resources.MyImage.;
b.MakeTransparent(b.GetPixel(0, 0));