I have a button called button1 and two panels called: panelA and panelB (visible is false by default) and the following code (WinForms):
panelA.Controls.Add(
The object button1 can have only one visual parent. Therefore you shouldn't add it to 2 different parents.
button1
So, you need to have 2 button objects.