Opacity of Control

Malfunction

Junior Contributor
Joined
Dec 8, 2003
Messages
203
Location
Berlin, Germany
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. :(
 
So it seems to be impossible to change opacity of a panel.
Now I'm trying to draw some layer manually using the setPixel routine. How can I draw pixels with transparency?
 
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.
 
garethowenldn said:
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.
 
Back
Top