title: Multiple instances of the same Active Form
body: <p>I have an Active Form, I made some years ago, compiled as an ocx. It is installed on the tool palette.</p>
  
  <p>I've only used one instance of it on each main application, and it has worked fine.</p>
  
  <p>Now I need to use many instances of this active form from the same main application. So I drop a couple of them from the tool pallette to my main application. But no matter which of the active forms I use (it has an built in form I open) from the application, the same instance of it shows up. And this is not what I want. </p>
  
  <p>I can't figure out if the active form should been created in a different way, or if I should use it different from the main application.</p>
  
  <p>The active form is built with c++builder XE, and the main application is built with XE6.</p>
  
  <p>This is the way I create the instances:</p>
  
  <pre class="lang-cpp prettyprint-override"><code> __fastcall TForm1::TForm1(TComponent* Owner)
     : TForm(Owner)
  {
     ActXList = new TList;
  
     TMyActX *TempActX;
  
     for(int i=0; i&lt;10; i++)
     {
        TempActX = new TMyActX(Owner);
        TempActX-&gt;Parent = this;  //Tried also with NULL and a new TForm(this), same result 
        ActXList-&gt;Add(TempActX);
        TempActX-&gt;Init(i);  //This adds i to a string in the created instance
     }
  
     MyActX1-&gt;Init(20);    //Adds 20 to a string in the design time created instance
     MyActX2-&gt;Init(21);    //Adds 21 to a string in the instance
  }
  </code></pre>
  
  <p>And here I open the different instances:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>void __fastcall TForm1::Button1Click(TObject *Sender)
  {
     TMyActX *TempActX;
  
     //A Combobox chooses the instance to show
     if(ComboBox1-&gt;ItemIndex &lt; 10)
     {
        TempActX = (TMyActX *)ActXList-&gt;Items[ComboBox1-&gt;ItemIndex];
        TempActX-&gt;ShowForm();
     }
     else if(ComboBoxTerminaler-&gt;ItemIndex == 10)
        MyActX1-&gt;ShowForm();
     else if(ComboBoxTerminaler-&gt;ItemIndex == 11)
        MyActX2-&gt;ShowForm();
  
     //No matter wich instance is choosen to be shown, 
     //the label with the init-string shows "0 1 2 3...9 20 21" for all of them
  }
  </code></pre>
  
  <p>For testing, the integer i is added to an Label in ->Init(). TMyActX has an internal form where the Label is shown. If I open this from (with any of the created instances), the Label shows "0 1 2 3 4...". Therefore I make the conclusion that ->Init() calls the same instance, and the same form is opened no matter which created instance I use to open it.</p>
  
  <p>The same thing happens if I drop two instanes to my main form at design time. The same Label is shown if I open the ocx-form.</p>
  
  <p>The reason I use an ocx, is that the ocx is a part of a payment solution, that is certified by a external oraganization. So I don't want to not mess around with it, if possible. But I have access of the code for it, and for testing I can change it.</p>