0

i'm coming with you cause i've a problem with a PNG transparency over a transparent Form in C#. i don't know how this problem is called, but i've take you a screen : https://i.ibb.co/xj37y7M/Capture.png.

For my main for, i've just applied a TransparencyKey with the same color as it own background.

For my picture it doesn't had any background.

Thank a lot for your help !

  • Transparency in Windows Forms is rather tricky. If you want to build flashy GUIs, a different framework might be a better choice - doing the same in barebones Windows Forms needs a lot of understanding of how Windows works, and will be quite expensive. Winforms doesn't do desktop composition - the illusion of transparency comes essentially from requesting the windows you're overlapping to draw on top of you. – Luaan Nov 04 '20 at 13:05
  • It's realy complicated for that in C# ? :/ – Luffydev Nov 04 '20 at 13:17
  • There is no easy solution for that ? – Luffydev Nov 04 '20 at 13:20
  • Not in C#, in Windows. That's just the way the old 90s window manager works, and Windows Forms uses that. But you can use e.g. WPF, which is not a 90s technology and has much better support for things like hardware acceleration and desktop composition. But of course there's tradeoffs involved. – Luaan Nov 04 '20 at 13:38
  • [C# Windows Form Transparent Background Image](https://stackoverflow.com/a/33531201/14171304) – dr.null Nov 04 '20 at 14:56

0 Answers0