0
私のForm1の移動イベントでは、私はその位置をチェックし、ユーザーの視野からそれを戻す場合は戻します。彼はそれを動かし終わったときに発砲する出来事はありますか?移動イベントは移動中に発生するため、移動後に移動イベントが必要です。ここに私のコードは、これまでのところです:ウィンドウが畳まずにMDIから離れることを防止しますか?
private void PublicTicker_Move(object sender, EventArgs e)
{
if (this.Left < 0)
{ this.Left = 0; }
else if (this.Left > this.MdiParent.ClientRectangle.Width - this.Width)
{ this.Left = this.MdiParent.ClientRectangle.Width - this.Width; }
if (this.Top < 3)
{ this.Top = 3; }
else if (this.Top > this.MdiParent.ClientRectangle.Height - this.Height)
{ this.Top = this.MdiParent.ClientRectangle.Height - this.Height; }
}
[移動フォームのみ垂直](http://stackoverflow.com/questions/4302440/move-form-only-vertically) –