Storing forms in a list and changing their location on event C#
<p>I've inherited a lot of code and am having trouble with the following: getting forms that sit in a specific location on the "master form" to move when the master form moves. </p>

<p>Right now, I have a list what stores each form that will lie inside my form, and an event handler for masterForm.ResizeEnd.  Inside the event handler I try to iterate through the list and set the .location property to something that is masterForm.location+constant.  But that doesn't work. I've tried all kinds of things, but none have worked.</p>

<p>Code:</p>

<pre><code>public List&lt;Form&gt; openForms=new List&lt;Form&gt;(1);

private void addForm(Form argument)
{
    openForms.Add(argument);
}

private void masterForm_ResizeEnd(object sender, System.EventArgs e)
{
    for(int i=0; i&lt;openForms.Count; i++) 
        openForms[i].Location = new system.drawing.point(this.location.x+constant, this.location.y+constant);
}
</code></pre>
