2011-09-23 7 views
0

WinAmp MP3 플레이어와 비슷한 자동 서식 지정 동작을 응용 프로그램에서 원합니다. 나는 창을 서로 붙여야한다. 그래서 한 창을 움직이면 다른 창들은 그 움직임을 따른다. 어떻게해야합니까?자동 폼 위치 지정

나는 이런 식으로 시도했다.

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

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

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

if (this.Location.Y <= 5) 
    this.Location = new Point(this.Location.X, 0); } // top y 
+0

당신의 시도의 결과가 무엇인가? 위의 코드를 어떤 경우에 배치 했습니까? –

답변