John

John

  • NA
  • 2
  • 0

Positioning of a new form

Feb 3 2009 8:58 AM
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)