Click here to Skip to main content
15,880,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

Like Some Webpages, I need one feature in My VB.NET WinForm Application.

While A Child Form is Active the Parent Form in the Background should have transparent dark layer on It, So that User Can easily focus on Active Form.

If Parent form Itself got activated, that dark layer should not appear.

Initial Idea was to use Panel Control but Unfortunately It doesnt have Opacity Property.

Thank you.
Posted

Making Transparent Controls - No Flickering[^]

Just make your own control that can do it, tutorial above. There's nothing out of the box in .NET that can do what you are asking, at least not in Win Forms. WPF is a lot easier because of how it works, Win Forms needs tricks to simulate transparency.
 
Share this answer
 
Comments
jenitshah 4-Jul-13 8:14am    
Thanks for your reply.
I found one efficient Solution here :
http://stackoverflow.com/questions/17469207/dark-transparent-layer-on-inactive-form/17469307?noredirect=1#17469307
To do this you have to take third window form which size is same as Parent form and that form's FormBorderStyle set to none,set background color as you want and set opacity to 30%. Show this form when child form activated, keep child form always on top. Hide this new form when child form closed.
 
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