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
什麼是你嘗試的結果?你在什麼情況下放置了上面的代碼? –