TotallyPwnage
TotallyPwnage

Reputation: 53

Open Form next to Parent Form

I have a form, which spawns another form. However it is un-coordinated and pretty darn ugly. So I ask, how do I spawn the form brushed against the parent form(first one).

Sorry if I sound wierd, but I just can't find the words to describe it.

Upvotes: 2

Views: 1402

Answers (1)

Albin Sunnanbo
Albin Sunnanbo

Reputation: 47038

From Form1

Form2 form2 = new Form2();
form2.Show();
form2.Location = new Point(this.Left + this.Width, this.Top);

optionally you may want to match height too

form2.Height = this.Height;

Upvotes: 6

Related Questions