Hi.
I have annoying problem with positioning of new form witch i was created additional to first one.
Code:
//In Form1 (basic one)
private void standard_Click(object sender, EventArgs e)
{standardButtonForm sBF = new standardButtonForm();
this.AddOwnedForm(sBF); //not necessary
sBF.Show();
}
//after button click new form is created
In a new created form i would like to set position in standardButtonForm_Load segment on the basis of Form1 parameters (Left, Bottom or something like this) but i don't know how to call these attributes and how to equate them to standardButtonForm.
I trie in standardButtonForm something like this
private void standardButtonForm_Load(object sender, EventArgs e)
{
Form1 xxx = new Form1();
this.Left=xxx.Left;
}
But I have wrong results.
Please help!!!
Loading
Jan MontanoPosted Feb 3, 2009, 11:21 AM
private void button1_Click(object sender, EventArgs e)
{
Form form2 = new Form();
form2.StartPosition = FormStartPosition.Manual;
form2.Left = this.Left;
form2.Top = this.Top;
form2.Show();
}