Automatic form-positioning
<p>I want my application to have an auto form-positioning behaviour, similar to the WinAmp MP3 player. I'd like windows to stick to each other, so that if you move one window the other windows follow the movement. How can I do that?</p>

<p>I tried something like this.</p>

<pre><code>if (this.Size.Width + this.Location.X &gt;= 1270)
    this.Location = new Point(1280 - this.Width, this.Location.Y); } //right x

if (this.Size.Height + this.Location.Y &gt;= 750)
    this.Location = new Point(this.Location.X, 760 - this.Width); } // bottom y

if (this.Location.X &lt;= 5)
    this.Location = new Point(0, this.Location.Y); } //left x

if (this.Location.Y &lt;= 5)
    this.Location = new Point(this.Location.X, 0); } // top y
</code></pre>
