What I want to achieve is the translucent background that covers the screen. And then you can draw opaque brushes on it.
What I tried is to have a shape with a screen size, then set the color and set this.opacity = 0.5. However, this affects all brushes in the form.
Ive also tried to set the background color to Color.Transparent, and then draw an extra brush that covers the screen with an opacity of 0.5, before I then paint the opaque brushes ... However, the background also becomes opaque. Even if the style flag is set(ControlStyles.SupportsTransparentBackColor, true)
I know that I can achieve this by having an additional form. One shape for a transparent background and one for an opaque foreground, but isn't that an excess?
Is there a better way?
Update 1:
An attempt at what is suggested in the comments.
Current state: Form1: the main program, requires an "overlay" display, which is: Form 2: Overlay background (translucent black) and, Form3: Overlay foreground, this is where the user draws.
Form 1 and 2 work as requested, however Form3 refuses to work with transparency. If i installed
this.BackColor = Color.Lime;
this.TransparencyKey = Color.Lime;
then performance drops and the program lags far behind (although it becomes transparent). Ideally, I would like to use this.BackColor = Color.Transparent;, however, this has no effect (solid background, without alpha).
Note that the form covers the screen, and the background is usually the desktop. Maybe why it doesn't work?