Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I need to cover a part of my form with a transparent layer. It should not be fully transparent though.

If I could just use a Panel and set it's opacity using a trackbar it'll be fine. But the panel doesn't have an opacity property. :(

Debug me...
  • *Gurus*
Posted

You can only do this if you're responsible for drawing everything under neath the "panel" yourself. Then you can just create a brush with a semi-transparent color and draw a rectangle, simple as that. But if you're trying to draw over windows control I'm afraid you're pretty much out of luck.

 

Maybe you could fake it by using a form without a titlebar and showing that over the top.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • 1 year later...
Posted
This is Genius!

I wouldn't say that, whilst it does fake a semi-transparent appearance, it only does so over its container. If you add say a checkbox to the form and position it behind the panel its not there. Refer to what divil said.

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...