开发者

opacity usercontrol c#.net 3.5

开发者 https://www.devze.com 2023-03-04 22:30 出处:网络
Why does not a user control have the \'Opac开发者_如何学编程ity\' property? How can I use set the property on a user control?For winforms

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

精彩评论

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