开发者

opacity usercontrol c#.net 3.5

Why does not a user control have the 'Opac开发者_如何学编程ity' property? How can I use set the property on a user control?


For winforms

To make a UserControl transparent, we have to give it a WS_EX_TRANSPARENT style, override its OnPaintBackground method to draw the background with the opacity, and then invalidates its Parent to redraw the control whenever we need to update the graphics


For WinForms

You can just set User Control Background property to Transparent in web colors tab

but for opacity such as 50% i am looking for a solution.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜