2014-10-07 26 views
0

我正在創建一個VSTO單詞添加。我開始從ThisAddin長時間闡述,我想將遊標更改爲WaitCursor,所以如果我去Globals.ThisAddIn。應用程序,沒有遊標屬性,我已經嘗試Cursor.Current = Cursors.WaitCursor;開始闡述時,和Cursor.Current = Cursors.Default;在闡述結束,但不起作用,遊標不會改變。等待光標在VSTO單詞加載項應用

有關如何做到這一點的任何想法?

+0

在此期間您有解決方案嗎? – ZerOne 2015-04-02 09:12:35

回答

1
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; 
}