title: Transparent background on system::windows::forms::form
body: <p>I have a System::Windows::Forms::Form and i'm trying to set the background to transparent.
  This form contains others components and have a background image.</p>
  
  <p>I try many solutions i have see on internet but nothing works.</p>
  
  <ul>
  <li>set form opacity to 0 -> Make the whole form become transparent.</li>
  <li>use colors::transparent -> Doesn't seems to work</li>
  <li>use TransparencyKey -> Doesn't seems to work too ...</li>
  <li>override OnPaintBackground or OnPaint event -> events doesn't seems to be called ...</li>
  </ul>
  
  <p>Illustration code:</p>
  
  <pre><code>    public ref class Form : public System::Windows::Forms::Form
      {
           public: Form(void) {
               InitializeComponent();
           }
  
           public: void InitializeComponent(void)
           {
               SetStyle(ControlStyles::SupportsTransparentBackColor, true);
               this-&gt;TransparencyKey = System::Drawing::Color::Fuchsia;
               this-&gt;BackColor = System::Drawing::Color::Fuchsia;
               // or ...
               this-&gt;BackColor = System::Drawing::Color::Transparent;
           }
  
           protected: virtual void OnPaint(PaintEventArgs e)override {}
           protected: virtual void OnPaintBackground(PaintEventArgs e)override {}
      }
  </code></pre>
  
  <p>Thanks for your help.
  Cyrbil</p>
  
  <p>Edit:</p>
  
  <p>Problem solved, first for the override, it's:</p>
  
  <pre><code>protected: virtual void OnPaint(PaintEventArgs^ e)override {}
  protected: virtual void OnPaintBackground(PaintEventArgs^ e)override {}
  </code></pre>
  
  <p>i just forget the ^.
  Then, i don't know why but i started a new project and try the others methods and it has works fine. So from now i use this new project and everythings fine. I guess it's just Visual C++ who had some random problems.</p>