Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good evening sir, iam working on csharp windows forms. my form have one picturebox and when i'm setting opacity of form to 50% then my picturebox also looking transparent. How to made picturebox got 100% opaque
Posted
Updated 4-Dec-11 6:28am
v3
Comments
DaveAuld 4-Dec-11 11:45am    
C# or VB.net ?
Monjurul Habib 4-Dec-11 13:49pm    
tag says C#
DaveAuld 4-Dec-11 14:53pm    
It does now. It originally just said Windows Forms.......

1 solution

You can apply transparency to the forms surface only by setting the background colour to something like Fuchsia, and then also set the forms transparencykey to the same colour.

Make sure any controls you want to remain visible are also not this colour, and if you don't want to be able to see the forms border or titlebar, then set the borderstyle to None.
 
Share this answer
 
Comments
Rao karthik 6-Dec-11 4:50am    
Yes i did the same thing but still the picturebox got transparent how to avoid picturebox transparency
DaveAuld 6-Dec-11 5:08am    
Manually set the BackColor of the picture box control to something else e.g. white.

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