Martijn Mulder wrote:
When I populate a ToolStrip with ToolStripButtons with a .png-image on
it, will Windows understand the transparency of the .png file?
Yes and no. Actually, I haven't tried this with a ToolStrip in
particular, but this did come up recently with other Control-based classes.
The transparency of the PNG is in fact preserved. However, the Control
background itself is still erased before the PNG with transparency is
drawn. This may apply to the ToolStripItem-derived classes too.
In this case, choosing "transparent" as the background color for the
item causes the background to be erased using the parent's color.
Assuming there's no overlap in your controls, this will have the net
effect of making the transparency in the image appear to work correctly.
But if there's overlap, you get that erased background on top of
whatever the underlying control is.
I don't actually know whether the ToolStripItem-derived classes have the
same behavior, but it seems possible that they would. Your best bet, of
course, is to try it. Then post back here with the answer. :)
Pete