0

I have a transparent form, on which I need to place a semi-transparent panel. I've gotten the panel to be semi-transparent relative to the form's color, but whenever I set the form to transparent, that semi transparency stops working. It seems it is only blending the color with the color of the control behind it, but when the form is transparent it doesn't do so with any windows that may be behind the form.

Is there any way this can be achieved? I'm not sure if I should be overwriting the form's paint method, the control's, or both.

Any help is appreciated! Thanks!

Qub1
  • 1,154
  • 2
  • 14
  • 31
  • 4
    (cue Hans Passant...) – adv12 May 19 '15 at 22:06
  • 1
    That can't work. Controls can have these effects in Win8 but that will be future-music for quite a while, Win7 is the new XP. Only other thing you can do is layer another window on top of the bottom one, [code is here](http://stackoverflow.com/a/4503371/17034). – Hans Passant May 19 '15 at 22:20
  • 1
    The other approach is to render the control yourself (or rather, render something in the form that looks like a control, but is transparent), but it's quite a lot of work for a basic aesthetic effect. – Jason Williams May 20 '15 at 11:07
  • A Panel is just a rectangle and if you draw it on the form your set, no? Any complications? – TaW May 20 '15 at 11:30
  • I suggest you to try WPF for such effects. – Fleve May 20 '15 at 12:58
  • @Fleve I've switched to WPF, and it takes some getting used to, but I think it'll be worth it in the end. Too bad the WPF "designer" isn't free, but I think I'll manage. Thanks for the help everyone! – Qub1 May 22 '15 at 20:52

0 Answers0