다음을 통해 공유


IVsUIHierarchyWindow2.SetCursor Method

Sets a new cursor for the UI hierarchy window.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'Declaration
Function SetCursor ( _
    hNewCursor As IntPtr, _
    <OutAttribute> ByRef phOldCursor As IntPtr _
) As Integer
int SetCursor(
    IntPtr hNewCursor,
    out IntPtr phOldCursor
)
int SetCursor(
    [InAttribute] IntPtr hNewCursor, 
    [OutAttribute] IntPtr% phOldCursor
)
abstract SetCursor : 
        hNewCursor:IntPtr * 
        phOldCursor:IntPtr byref -> int
function SetCursor(
    hNewCursor : IntPtr, 
    phOldCursor : IntPtr
) : int

Parameters

  • hNewCursor
    Type: IntPtr

    [in] New cursor to display in the hierarchy window.

  • phOldCursor
    Type: IntPtr%

    [out, retval] Cursor replaced by the new cursor.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method allows you to show a different cursor in the UI hierarchy window when required to indicate specific actions.

To use this method, pass your new cursor into the UI hierarchy window using this method. This method then returns the cursor that you are replacing. Store the old cursor returned by this method and upon completion of the action requiring the new cursor, call this method again, passing in the old cursor through the hNewCursor parameter.

.NET Framework Security

See Also

Reference

IVsUIHierarchyWindow2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace