I am using WinForms with C#. I have a **form** that its opacity is set to **X**. I want to draw a filled **rectangle** that its opacity is **Y**.

If I draw it like this:

```
private void Form1_Paint(object sender, PaintEventArgs e)
{
    e.Graphics.FillRectangle(
        new SolidBrush(Color.FromArgb(Y, 255, 0, 0)),//Red brush (Y opacity)
        new Rectangle(100,100,500,500)
        );
}

```

then, the `Y` value I have for the `opacity of the brush` for the rectangle drawing is getting multiplied by the `X` opacity of my form, so instead I get `X*Y`.

I think it has to do with `e.Graphics`, which comes from the form. How can I go about this ?