Malfunction Posted February 6, 2004 Posted February 6, 2004 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. :( Quote Debug me...
Malfunction Posted February 11, 2004 Author Posted February 11, 2004 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? Quote Debug me...
*Gurus* divil Posted February 11, 2004 *Gurus* Posted February 11, 2004 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Malfunction Posted February 11, 2004 Author Posted February 11, 2004 I was just trying to put a semi-transparent layer over an image... .Net is not flash but did I really ask for too much? ;) Quote Debug me...
Hamburger1984 Posted February 11, 2004 Posted February 11, 2004 see attachment... should answer your question... but keep in mind that this won't work with all controls... Andreastransparentcontrols.zip Quote
garethowenldn Posted January 5, 2006 Posted January 5, 2006 see attachment... should answer your question... but keep in mind that this won't work with all controls... Andreas This is Genius! Quote
Cags Posted January 5, 2006 Posted January 5, 2006 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. Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.