Control.OnMove メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


イベントが発生すると、デリゲートを使用してイベント ハンドラが呼び出されます。詳細については、「イベントの発生」を参照してください。
OnMove メソッドを使用すると、デリゲートを結び付けずに、派生クラスでイベントを処理することもできます。派生クラスでイベントを処理する場合は、この手法をお勧めします。
継承時の注意 派生クラスで OnMove をオーバーライドする場合は、登録されているデリゲートがイベントを受け取ることができるように、基本クラスの OnMove メソッドを呼び出してください。
Move イベントを使用して、フォームのキャプション バーにフォームの位置を画面座標で表示するコード例を次に示します。
' The following example displays the location of the form in screen coordinates ' on the caption bar of the form. Private Sub Form1_Move(sender As Object, e As System.EventArgs) Handles MyBase.Move Me.Text = "Form screen position = " + Me.Location.ToString() End Sub
// The following example displays the location of the form in screen coordinates // on the caption bar of the form. private void Form1_Move(object sender, System.EventArgs e) { this.Text = "Form screen position = " + this.Location.ToString(); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からControl.OnMove メソッドを検索する場合は、下記のリンクをクリックしてください。

- Control.OnMove メソッドのページへのリンク