开发者

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]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜