G
Guest
I have an application with a main form (size 300, 200) and I added another
form to the project. I would like to set the second form to center on the
main form. I have tried setting the parent of the second form to be the
first form using:
this.Parent = Form1; (both with and without the ( ))
but that doesn't work, otherwise I could set the CentreParent property for
Form2. I also tried adding the following to the constructor of Form1:
Form2 fm2 = new Form2();
fm2.Parent = this;
Still won't work.
Any ideas?
form to the project. I would like to set the second form to center on the
main form. I have tried setting the parent of the second form to be the
first form using:
this.Parent = Form1; (both with and without the ( ))
but that doesn't work, otherwise I could set the CentreParent property for
Form2. I also tried adding the following to the constructor of Form1:
Form2 fm2 = new Form2();
fm2.Parent = this;
Still won't work.
Any ideas?