c# - VSTO word 加载项应用程序中的等待光标

标签 c# vsto add-in

我正在创建一个 VSTO word 插件。我从 ThisAddin 开始了很长的阐述,我想将光标更改为 WaitCursor,所以如果我转到 Globals.ThisAddIn.Application,则没有光标属性,我在开始阐述时尝试使用 Cursor.Current = Cursors.WaitCursor;,在阐述结束时尝试使用 Cursor.Current = Cursors.Default;,但没有不起作用,光标不会改变。

关于如何做到这一点有什么想法吗?

最佳答案

private static void SetCursorToWaiting()
{
   Microsoft.Office.Interop.Word.Application application = Globals.ThisAddIn.Application;
   application.System.Cursor = wdCursorWait;
}
private static void SetCursorToDefault()
{
   Microsoft.Office.Interop.Word.Application application = Globals.ThisAddIn.Application;
   application.System.Cursor = wdCursorNormal;
}

关于c# - VSTO word 加载项应用程序中的等待光标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26241030/

相关文章:

c# - Windows 商店应用程序 - 检测应用程序的首次启动

c# - 在 C# 中将 SQL 二进制数据转换为字符串

c# - Visual Studio 实际上是如何进行 Excel 加载项调试的

c# - 在 Wow6432Node 和普通配置单元中创建注册表

c# - 我可以迁移到 Entity Framework 中没有迁移的情况下创建的数据库吗?

c# - signalR + IIS 404 协商 angular4 客户端(1.0.0-preview1-final)

ms-word - Word VSTO 加载项 : Get Working Area Coordinates/Rectangle on Screen

.net - itgenclr007 : Fix OutOfMemory in 32-bit Excel with VSTO add-in

c# - 从 Office 加载项中的线程显示 WPF 弹出窗口

c# - 获取 VS 插件或 DXCore 插件的解决方案/项目文件列表