title: How to clone the panel control to the same form dynamically in vb.net
body: <p>My need is to generate the copy of existing panel under the same panel in my form</p>
  
  <p>I have written some code that would do my desired work but it's not going to work according to my needs, but It destroy the main panel and generate a copy, but I don't want to destroy first one, I want to keep all the panels...</p>
  
  <p>This is the function that I've called at button "+" click event</p>
  
  <pre><code>Friend Function AddNewPanel() As System.Windows.Forms.Panel
          Dim Pnl As New System.Windows.Forms.Panel
          Pnl = MediPanel  'This is the main panel that I want to copy
          Pnl.Top = 500
          'Pnl.Left = 100        
          ParentPanel.Controls.Add(Pnl)  'ParentPanel in which I want to generate a copy
          Return Pnl
      End Function
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/AUgcy.png" rel="nofollow noreferrer">This is what I exactly want</a> but <a href="https://i.stack.imgur.com/ZKOML.png" rel="nofollow noreferrer">This is actually happened</a></p>
  
  <p>So, I want to generate copy of panel as I press "+" button and also earlier panels should not be destroyed..</p>