vb.net - 如何让按钮背景透明?

标签 vb.net winforms visual-studio-2012

我创建了一个按钮并在其上应用了图像(具有透明背景的.png)。
enter image description here
我的按钮背景设置为透明,但正如您所看到的,背景颜色仍然存在。
我怎样才能使这项工作正常进行?

最佳答案

尝试一下。

'Making Existing Button Transparent
btnKasa.FlatStyle = Windows.Forms.FlatStyle.Flat
btnKasa.FlatAppearance.BorderSize = 0
btnKasa.FlatAppearance.MouseDownBackColor = Color.Transparent
btnKasa.FlatAppearance.MouseOverBackColor = Color.Transparent
btnKasa.BackColor = Color.Transparent

关于vb.net - 如何让按钮背景透明?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27628216/

相关文章:

C# 是否可以更改 ListView 中的 e.Label 值

f# - Visual Studio 11 开发人员预览版中的 F# 3.0 出现内部 F# 错误?

c# - 使用 System.Drawing.Font 限制字体大小?

vb.net - 为什么 WCF 将 Enum 序列化为字符串?

vb.net - 将串联的 VB.NET 字符串文字转换为多行字符串

vb.net - 检查 false bool 条件时不是关键字 vs = False

c# - 从 Windows 服务启动 WinForms 应用程序

c# - 当另一个关闭时显示最小化的形式

c# - 创建 Windows 应用商店应用程序时出现问题。 (Windows 8)

.net - c#.net 本地数据库 Windows 窗体