Hi I've setup a few subforms all inheriting from a root form that sets up a few buttons and logos etc to then filter down to the children. I used the visual studio wizard to add the subforms inheriting from the root and they are automatically declared with:
public partial class WelcomeForm : MynetInstaller.rootForm
I've now been asked to resize the subforms and move a button, things I hope would be done by simply changing the root form and allowing the changes to filter down.
The two problems I have are: 1/ I change the size, this does not affect the children at all, it seems after the initial setup the size is not inherited.
2/ I change the location of a button, this causes all subforms to break showing an error that:
To prevent possible data loss before loading the designer, the following errors must be resolved:
'child' is not a child control of this parent.
Instances of this error (1)
1. Hide Call Stack
at System.Windows.Forms.Control.ControlCollection.GetChildIndex(Control child, Boolean throwException)
at System.Windows.Forms.Control.ControlCollection.SetChildIndexInternal(Control child, Int32 newIndex)
at System.Windows.Forms.Control.ControlCollection.SetChildIndex(Control child, Int32 newIndex)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.SetChildIndex(Control child, Int32 newIndex)
If i press continue it will load the page, but wont have moved the button and if i try and run it i get an error in:
this.Controls.SetChildIndex(this.btnNext, 0);
Saying:
'child' is not a child control
I noticed that when i move the control it stops becoming locked, but changing this manually doesn't help.