954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

transparancy on a control in C#

hi,

is it possible to make any control (like button/textfield) transparant, just like the "alpha" method in flash?

tnx

isiebe
Newbie Poster
3 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Yes, if you are using visual studio you can select the control, view properties and under the 'colour' property (I think its called that - don't have VS in front of me) choose Alpha - I believe it is under the 'web' tab. Hope this helps!

majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 
Yes, if you are using visual studio you can select the control, view properties and under the 'colour' property (I think its called that - don't have VS in front of me) choose Alpha - I believe it is under the 'web' tab. Hope this helps!

Tnx, but that's not what I exactly needed,
is it possible to make full controls semi-transparent, lik you give an transparency percentage... with the ultimate goal to animate a control fading away :)

tnx

isiebe
Newbie Poster
3 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Are you more looking for a user control that controls a form's visibility like this :

http://www.codeproject.com/KB/cs/transparentwindowsincsharp.aspx
majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

What the original poster needs is WPF (Windows Presentation Foundation) that is built into .NET 3.0.

Setting transparency of a control is as simple and easy as Opacity = 0.6 or something similar.

Of course, I could understand if you dont want to learn WPF for such a simple problem, except I don't have anything up my sleeve.

scru
Posting Virtuoso
1,629 posts since Feb 2007
Reputation Points: 975
Solved Threads: 140
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You