按钮/文本框的透明度 - VB.NET [英] Opacity of Buttons/TextBoxes - VB.NET

查看:472
本文介绍了按钮/文本框的透明度 - VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能设置一个按钮或文本框的透明度?我知道,你可以设置一个形式的不透明度,但我不是很确定按钮或文本框。

Is it possible to set the opacity of a button or textbox? I know that you can set the opacity for a form, but I'm not so sure about a button or textbox.

推荐答案

有没有办法设置的WinForms任何控制的不透明度。只有形式有透明度属性。
如果你想使任何控制出现半透明的,你就必须从头开始实现整个控制,这将很可能会涉及绘制控件作为图像到它的父。

There is no way to set the opacity of any control in WinForms. Only Forms have the opacity property. If you want to make any control appear semi-transparent, you'll have to implement the whole control from scratch and that will most likely involve drawing the control as an image onto its parent.

您选择是使用WPF,它允许设置控件的透明度。

Your alternative is to use WPF, which allows setting the opacity of controls.

这篇关于按钮/文本框的透明度 - VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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