自定义图像按钮背景

自定义图像按钮背景

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

问题描述

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

推荐答案


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

08-14 10:51