Forms Position

  • Thread starter Thread starter Patrick De Ridder
  • Start date Start date
P

Patrick De Ridder

I have a form1. From it I can select form2.
Like so:

DataIO MyIO = new DataIO;
MyIO.Show();

I want MyIO to appear in a certain position on form1.
Say in position (0,0)

Which line of code would do the job?

MyIO.Location = new Point(0,0);

does not do the job.

Pleas help.



....
Gato
 
When you have the form in designer view - set the top in left in the
properties box - and see what code it changes..
 
Frank Drebin said:
When you have the form in designer view - set the top in left in the
properties box - and see what code it changes..
I have been trying to interpret your instruction, but I am afraid it doesn't
make sense to me. Sorry, could you be a little bit more specific, or
rephrase your instruction? Many thanks.
 
Hi, there is a property on the Form, StartPosition.

Example:

Form f = new Form();
f.StartPosition = FormStartPosition.Manual;
f.Location = new Point(100,100);
f.Show()

HTH
 
mia lanui said:
Hi, there is a property on the Form, StartPosition.

Example:

Form f = new Form();
f.StartPosition = FormStartPosition.Manual;
f.Location = new Point(100,100);
f.Show()

That's great, thank you. Couldn't find it MSDN.
 
Back
Top