Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i gave my form a background image and the buttons i added over it covers it up!

What I have tried:

i tried to look up for the transparency settings in the property but i couldnt find one.
Posted
Updated 12-Jul-18 6:44am
Comments
Mehdi Gholam 12-Jul-18 3:27am    
Which technology winforms, wpf, web ...?
Kornfeld Eliyahu Peter 12-Jul-18 4:29am    
C# (but that should be transparent for you :-))
[no name] 12-Jul-18 9:15am    
C# is just a language. Which tech do u use to make UI?

1 solution

If this is WinForms then you need to be a bit cleverer and play the Opacity using setstyle - there is an MS Article that tells you how How to: Give Your Control a Transparent Background[^] and a slightly more in-depth one here on CodeProject Transparent Bitmap Buttons with Alpha-Blended Regions in .NET[^]

With WPF you have to play around with the brush's opacity - Brush.Opacity Property (System.Windows.Media)[^]

In Web stuff you should be able to use
MyButton.BackColor = Color.Transparent;
or do it in the CSS
background-color: transparent;
 
Share this answer
 

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