バージョン

IUIElementCursorFilter インターフェース

カスタムのカーソルの提供を可能にするために、コントロールのユーザーによって提供されるインターフェイス
シンタックス
'宣言
 
Public Interface IUIElementCursorFilter 
public interface IUIElementCursorFilter 
使用例
Imports Infragistics.Win
    Imports Infragistics.Win.UltraWinGrid

' Implement the IUIElementCursorFilter interface on a class
' (in this case the form)
Public Class Form1
    Inherits System.Windows.Forms.Form
    Implements Infragistics.Win.IUIElementCursorFilter

    Private customCursor As Cursor

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        ' Load and cache the resize cursor from an embedded resource 
        Me.customCursor = New Cursor(Me.GetType(), "MyResizeCursor.cur")

        ' Set the grid’s CursorFilter property to the object that
        ' implements the IUIElementCursorFilter interface.
        Me.UltraGrid1.CursorFilter = Me

    End Sub


    Public Sub BeforeSetCursor(ByVal element As Infragistics.Win.UIElement, ByVal adjustableCursor As Boolean, ByRef cursor As System.Windows.Forms.Cursor) Implements Infragistics.Win.IUIElementCursorFilter.BeforeSetCursor
        
        ' If the mouse is over the adjustable area of a 
        ' HeaderUIElement then return our custom resize cursor
        If adjustableCursor = True Then
            If TypeOf (element) Is HeaderUIElement Then
                cursor = Me.customCursor
            End If
        End If

    End Sub
using System.Diagnostics;
	using Infragistics.Win;
	using Infragistics.Win.UltraWinGrid;

// Implement the IUIElementCursorFilter interface on a class
// (in this case the form)
public class Form1 : 
		System.Windows.Forms.Form, 
		Infragistics.Win.IUIElementCursorFilter
{

	private Cursor myCustomCursor = null;

	private void Form1_Load(object sender, System.EventArgs e)
	{

		// Set the grid’s CursorFilter property to the object that
		// implements the IUIElementCursorFilter interface.
		this.ultraGrid1.CursorFilter = this;

		// Load and cache the resize cursor from an embedded resource 
		this.myCustomCursor = new Cursor(this.GetType(), "MyResizeCursor.cur");

	}

	public void BeforeSetCursor(Infragistics.Win.UIElement element, bool adjustableCursor, ref System.Windows.Forms.Cursor cursor)
	{

		// If the mouse is over the adjustable area of a 
		// HeaderUIElement then return our custom resize cursor
		if ( adjustableCursor && 
			 element is HeaderUIElement )
		{
			cursor = this.myCustomCursor;
		}

	}
参照