Groups | Blog | Home
all groups > c# > august 2003 >

c# : Forms Position



Frank Drebin
8/19/2003 8:48:18 PM
When you have the form in designer view - set the top in left in the
properties box - and see what code it changes..

[quoted text, click to view]

Patrick De Ridder
8/19/2003 10:39:00 PM
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.



....
Patrick De Ridder
8/20/2003 1:30:11 AM
[quoted text, click to view]
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.
--
Patrick.

mia lanui
8/20/2003 1:37:15 AM
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


[quoted text, click to view]

Patrick De Ridder
8/20/2003 8:29:46 AM

[quoted text, click to view]

That's great, thank you. Couldn't find it MSDN.
--
Patrick.


AddThis Social Bookmark Button