自定义图像按钮背景 [英] Custom image button background

查看:98
本文介绍了自定义图像按钮背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有一个自定义图像按钮,我用透明度绘制到图形对象上(以摆脱所用图像的背景)。然而,当我这样做时,屏幕外的图形。清除(this.BackColor)

控制仍然具有"背景颜色"。控制,有没有办法让这个透明?目前我的图像按钮周围有一条丑陋的线条。

如果我用Color.Empty填充位图,我的位图上仍会有黑色背景。

提前感谢

Hello there,

I have a custom image button, which i draw onto the graphics object with transparency (to get rid of the background of the image used). However when i do

offscreenGraphics.Clear(this.BackColor)

the control still has the "Back Color" of the control, is there a way to also make this transparent? Currently i have an ugly line around my image button.

If i fill the bitmap with Color.Empty, i still get a black backround on my bitmap.

Thanks in advance

推荐答案

嗨Cagdasal,

你可以参考基督教博客 .NETCF中的半透明控件 希望这可能是有帮助的。


Hi Cagdasal,

You can refer christian blog Semi-Transparent Controls in .NETCF   for the same.


Hope this may be help.




这篇关于自定义图像按钮背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆