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

Dim e As EventArgs Me.OnMouseLeave(e)

イベントが発生すると、デリゲートを使用してイベント ハンドラが呼び出されます。詳細については、「イベントの発生」を参照してください。
OnMouseLeave メソッドを使用すると、デリゲートを結び付けずに、派生クラスでイベントを処理することもできます。派生クラスでイベントを処理する場合は、この手法をお勧めします。
継承時の注意 派生クラスで OnMouseLeave をオーバーライドする場合は、登録されているデリゲートがイベントを受け取ることができるように、基本クラスの OnMouseLeave メソッドを呼び出してください。
このメソッドの使用方法を次のコード例に示します。次の例は「方法 : Windows フォーム DataGridView コントロールのセルと列を、それぞれの動作と外観を拡張してカスタマイズする」で取り上げている例の一部です。
' Force the cell to repaint itself when the mouse pointer enters it. Protected Overrides Sub OnMouseEnter(ByVal rowIndex As Integer) Me.DataGridView.InvalidateCell(Me) End Sub ' Force the cell to repaint itself when the mouse pointer leaves it. Protected Overrides Sub OnMouseLeave(ByVal rowIndex As Integer) Me.DataGridView.InvalidateCell(Me) End Sub
// Force the cell to repaint itself when the mouse pointer enters it. protected override void OnMouseEnter(int rowIndex) { this.DataGridView.InvalidateCell(this); } // Force the cell to repaint itself when the mouse pointer leaves it. protected override void OnMouseLeave(int rowIndex) { this.DataGridView.InvalidateCell(this); }

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


DataGridView クラス
DataGridView メンバ
System.Windows.Forms 名前空間
その他の技術情報
DataGridView コントロール (Windows フォーム)
Weblioに収録されているすべての辞書からDataGridView.OnMouseLeave メソッドを検索する場合は、下記のリンクをクリックしてください。

- DataGridView.OnMouseLeave メソッドのページへのリンク