C# 在VSTO word加载项应用程序中等待光标

C# 在VSTO word加载项应用程序中等待光标,c#,vsto,add-in,C#,Vsto,Add In,我正在创建VSTO word加载项。我从ThisAddin开始了一个漫长的细化过程,我想将游标更改为WaitCursor,因此如果我转到Globals.ThisAddin.Application,则没有游标属性,我尝试了cursor.Current=Cursors.WaitCursor和Cursor.Current=Cursors.Default在精化结束时,但不起作用,光标不会更改 有什么办法吗?试试这个。以下是。您现在有解决方案吗?对于Excel,在应用程序对象上有一个属性Cursor:Gl

我正在创建VSTO word加载项。我从ThisAddin开始了一个漫长的细化过程,我想将游标更改为WaitCursor,因此如果我转到Globals.ThisAddin.Application,则没有游标属性,我尝试了
cursor.Current=Cursors.WaitCursor
Cursor.Current=Cursors.Default在精化结束时,但不起作用,光标不会更改


有什么办法吗?

试试这个。以下是。

您现在有解决方案吗?对于Excel,在
应用程序
对象上有一个属性
Cursor
Globals.ThisAddIn.Application.Cursor=XlMousePointer.xlWait
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;
}