Share via


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: System.IntPtr
    [in] New cursor to display in the hierarchy window.
  • phOldCursor
    Type: System.IntPtr%
    [out, retval] Cursor replaced by the new cursor.

Return Value

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

Implements

IVsUIHierarchyWindow.SetCursor(IntPtr, IntPtr%)

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