我正在创建一个 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/