ekey11
asked on
Transparent TextBox in C#
dear all:
How can realize transparent TextBox in C#?
THS!
ekey11
How can realize transparent TextBox in C#?
THS!
ekey11
ASKER
hi,
thanks
I need TextBox Control transparent , not others, and i need code or method .
THS
thanks
I need TextBox Control transparent , not others, and i need code or method .
THS
<asp:TextBox id="TextBox1" runat="server" BackColor="Transparent" BorderStyle="None" BorderColor="Transparent"> afdasdf</a sp:TextBox >
If you're using Microsoft Visual C# .NET,
1) right click TextBox - Properties
2) BackColor - Web - Transparent
3) BorderColor - Web - Transparent
4) BorderStyle - None
1) right click TextBox - Properties
2) BackColor - Web - Transparent
3) BorderColor - Web - Transparent
4) BorderStyle - None
It can be done to most control eg. Buttons.
ASKER
1) right click TextBox - Properties
2) BackColor - Web - Transparent - nullity
3) BorderColor - Web - Transparent - no Properties
4) BorderStyle - None
2) BackColor - Web - Transparent - nullity
3) BorderColor - Web - Transparent - no Properties
4) BorderStyle - None
(?_?)
try this:
textBox1.BackColor = this.BackColor ;
textBox1.BorderStyle = BorderStyle.None;
textBox1.BackColor = this.BackColor ;
textBox1.BorderStyle = BorderStyle.None;
ASKER
i tried it . if Form's back has a picture ,not work!!
this question is not easy.
this question is not easy.
It works for me... Strange...
I enough have a background picture on the form.
ASKER
do you sure in C#???
*-*
*-*
Yap. I'm sure. I only use C# for .Net
<%@ Page language="c#" Codebehind="filename.aspx. cs" AutoEventWireup="True" Inherits="proj.filename" codePage="1200" smartNavigation="True" enableViewState="True"%>
ASKER
can you offer your code?
THS
THS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TextBox doesn't support transparent background colors.
You have to write your own TextBox control
You have to write your own TextBox control
BTW, you may also try to assign BackColor property of TextBox the BackColor property of your form.
It should work
It should work
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For example, you may insert the line
this.textBox1.BackColor = this.BackColor;
after you assign picture to BackColor property of your form.
this.textBox1.BackColor = this.BackColor;
after you assign picture to BackColor property of your form.
this may help you
http://www.c-sharpcorner.com/Code/2003/May/TransparentControls.asp