IVsUIShell2.GetVSCursor 方法

将处理返回到指定的光标类型的光标。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)

语法

声明
Function GetVSCursor ( _
    cursor As UInteger, _
    <OutAttribute> ByRef phIcon As IntPtr _
) As Integer
int GetVSCursor(
    uint cursor,
    out IntPtr phIcon
)

参数

  • phIcon
    类型:System.IntPtr%
    [out] 32 位整数句柄 (HCURSOR) 为相应的光标。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell80.idl:

HRESULT IVsUIShell2::GetVSCursor(
   [in]  VSCURSORTYPE cursor,
   [out] HCURSOR*    phIcon
);

通过使用标准的 windows 光标管理工具, Vspackage 中的非托管代码或 C++ 编写能直接使用光标。有关更多信息,请参见 Cursors

用托管代码编写的 Vspackage 应实例化 Cursor 类的实例通过使用将处理到光标作为参数的构造函数的重载。有关更多信息,请参见 T:System.Windows.Forms.Cursor

.NET Framework 安全性

请参见

参考

IVsUIShell2 接口

Microsoft.VisualStudio.Shell.Interop 命名空间