1
Answer

Positioning of a new form

Ask a question
John

John

15y
2.7k
1
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!!!

Answers (1)