title: WinForm Control with Opacity
body: <p>I have a form that has some controls on itself(btnCreateReport,pnlDarkLayer).I have a panel that fit to form(Dock = Fill) and it is on the back of all controls.when user click on the btnCreateReport button ,I call pnlDarkLayer  BringToFront method and after some calculation I call SendToBack() method of the button.I want to draw a dark layer on form controls and disable all of controls on the form.
  Is it possible? Thanks.</p>
  
  <p>Maybe this code help u to understand my purpose:</p>
  
  <pre><code>private void btnCreateReport_Click(object sender, EventArgs e)
  {
      pnlDarkLayer.BackColor = Color.FromArgb(100, Color.Gray);         
  
      pnlDarkLayer.BringToFront();
      btnCreateReport.Enabled = false;
  
      Thread ProcessReport = new Thread(new ThreadStart(ProcessingReport));
      ProcessReport.Start();
      while (ProcessReport.IsAlive)
      {
          Application.DoEvents();
      }
      pnlDarkLayer.SendToBack();
  
      btnCreateReport.Enabled = true;
  
  }
  </code></pre>
  
  <p>This code hide all of controls but i don't want to hide controls on the form.I want to draw a dark layer on them.And User must can see controls.
  I need something like opacity property of forms for their controls.</p>
  
  <p>I have test this: </p>
  
  <p><code>pnlDarkLayer.CreateGraphics().CompositingMode=System.Drawing.Drawing2D.CompositingMode.SourceOver;</code></p>
  
  <p><strong>Update</strong>: I have test this one: (use a form instead of panel)</p>
  
  <pre><code>private void btnCreateReport_Click(object sender, EventArgs e)
  {          
  
      btnCreateReport.Enabled = false;
  
      frmProgress ProgressForm = new frmProgress();
      ProgressForm.TopLevel = false;
      ProgressForm.Parent = this;
      ProgressForm.BringToFront();
      this.Controls.Add(ProgressForm);
      ProgressForm.Show();
  
      Thread ProcessReport = new Thread(new ThreadStart(ProcessingReport));
      ProcessReport.Start();
  
      while (ProcessReport.IsAlive)
      {
          Application.DoEvents();
      }
      ProgressForm.Close();
      btnCreateReport.Enabled = true;
  
  }
  </code></pre>
  
  <p>But I can't see the ProgressForm in my form.</p>