C# 使文本框透明
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1716427/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Making a TextBox Transparent
提问by Nathan Campos
I have a TextBox in my Form that I want to let it be tranparent and show a picture that is in a PictureBox, behind it, but how I can do this? Thanks.
我的表单中有一个 TextBox,我想让它透明,并在它后面显示一个 PictureBox 中的图片,但我该怎么做?谢谢。
采纳答案by Joel
Not too complex, after some searching on StackOverflow, I found this answer.
不太复杂,在 StackOverflow 上进行了一些搜索后,我找到了这个答案。
Basically, you need to subclass TextBoxand in its constructor add the appropriate style.
基本上,您需要子类化TextBox并在其构造函数中添加适当的样式。
Final stpe, set its BackColorto Transparent. Hope it helps.
最后一步,将其设置BackColor为透明。希望能帮助到你。

![C# 如何将 string[] 转换为 ArrayList?](/res/img/loading.gif)