다음을 통해 공유


IVsUIHierarchyWindow.SetCursor Method

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

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

Syntax

‘선언
Function SetCursor ( _
    hNewCursor As IntPtr, _
    <OutAttribute> ByRef phOldCursor As IntPtr _
) As Integer
‘사용 방법
Dim instance As IVsUIHierarchyWindow
Dim hNewCursor As IntPtr
Dim phOldCursor As IntPtr
Dim returnValue As Integer

returnValue = instance.SetCursor(hNewCursor, _
    phOldCursor)
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.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIHierarchyWindow::SetCursor(
   [in]HCURSOR hNewCursor,
   [out, retval]HCURSOR *phOldCursor
);

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

IVsUIHierarchyWindow Interface

IVsUIHierarchyWindow Members

Microsoft.VisualStudio.Shell.Interop Namespace