Transparent Panel on Form that has a backgroundimage
I have a Form, that has a BackgroundImage, and the BackColor of form is set to r开发者_如何学JAVAed. Then, I try to add a panel on that form, set panel's Background to Transparent, but it inherits Form's BackColor and thus panel's background becomes red.
How do I "tell" the panel not to inherit Form's BackColor, but Form's BackgroundImage?
Update: It's working fine on Windows 7, but not on Windows XP (SP3).
Fixed: The problem was caused by overriding Form's CreateParams and turning on WS_EX_COMPOSITED
That is because Windows Forms ask for the backcolor of the parent control when current control's backcolor is set to transparent. Transparent Panel
change the panel property BackColor to Transparent [web tab]
精彩评论