Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I simply Transparent a TextBox in C# environment Visiual Studio 2013
Posted
Comments
Thomas Daniels 7-Mar-14 4:43am    
Do you use Windows Forms, WPF or ASP.NET?

You can do it by inserting the following lines in the textbox constructor
C#
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent;

You can also make a new partial class if you need to do it a lot the reference for that is here

http://stackoverflow.com/questions/16050249/c-sharp-transparency-on-textbox[^]
 
Share this answer
 
v3
Try this.
C#
TextBox1.BackColor = Color.Transparent;

and yeah, look at this : Making Transparent Controls - No Flickering[^]

-KR
 
Share this answer
 
Comments
dinesh-solanki 24-Apr-18 4:04am    
this gives exception : "control does not support transparent color"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900