If you're showing the form using the ShowDialog method then set the form's
StartPosition to FormStartPosition.CenterParent. Otherwise, you can use code
similar to the code shown below.
Form2 f = new Form2();
f.StartPosition = FormStartPosition.Manual;
f.Location = new Point((this.Left + (this.Width / 2) - (f.Width / 2)),
(this.Top + (this.Height / 2) - (f.Height / 2)));
f.Show();
--
Tim Wilson
..NET Compact Framework MVP
"Ann Huxtable" <an**********@research-labs.de> wrote in message
news:dm**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
I want to write some code to center one form over another (show one form
on top of the other). Anyone care to show me in a few lines how to do
this ?. Thanks