【文件属性】:
文件名称:C#自定义控件背景色透明的方法
文件大小:15KB
文件格式:DOCX
更新时间:2015-06-28 02:36:05
C# 控件 透明
解决自定义控件不透明的方法。I struggled for ages with the problem of having controls show through a control that was painted on top of them. It seems that ControlStyles.SupportsTransparentBackColor just allowed the control to pick up the container's background colour/image and wouldn't prevent the control from hiding any controls that were underneath it. I eventually found an answer so I thought I would post it here. This code example of a Pointer class, will take an alpha-blended png in the constructor and allow all the controls behind it to show through the transparent or semi-transparent pixels in the png, even when the pointer's location is changed ...
网友评论
- 未能解决问题,并且网上到处都有这种方法,差评,骗子
- 虽然不错,但是和lz描述的差异也比较大,和我的需求差异也不小。
- 好像不错,但是没理解如何使用,是否有程序样例呢
- 没有解决我的问题!
- 未能解决问题,并且网上到处都有这种方法
- 未能解决问题,并且网上到处都有这种方法,
- 很不错。。不过,我的需求有点不一样
- 这个资源不错,一般的问题都能解决,只是我的这个问题有点不太一样。就资源本身来说,还不错的。
- 这个资源不错,一般的问题都能解决,只是我的这个问题有点不太一样。就资源本身来说,还不错的。
- 对控件可以用。不错。
- 对于一般的控件的确是可以用的啊。但我用的是RDP控件。所以没什么用。哎。。
- 不错,可用,不过我尝试改成半透明就不行了,不知我哪里没弄对