Why can't I change my cursor in Excel?

Add-in Express™ Support Service
That's what is more important than anything else

Why can't I change my cursor in Excel?
 
George Spears




Posts: 70
Joined: 2010-05-06
Hello,

With Delphi XE6, I have Add-In Express and a RibbonTab. I add a button to the ribbon tab. From this button, if I create my own form, I can then change the cursor to crHourglass, and I see the busy cursor. If I have the same code hanging directly off a button on the RibbonTab, the "change cursor to busy" code doesn't appear to do anything. What am I missing? Here is my code... which compiles fine, and works if I create my own form.

var
Save_Cursor: TCursor;
begin


Save_Cursor := Screen.Cursor;
Screen.Cursor := crHourglass;
... Do work here
Screen.Cursor := Save_Cursor;
[CODE]
Posted 21 Oct, 2014 08:52:37 Top
George Spears




Posts: 70
Joined: 2010-05-06
Nevermind... I figured it out...
Working code is...

ExcelApp.Cursor[LOCALE_USER_DEFAULT] := xlWait;
...
ExcelApp.Cursor[LOCALE_USER_DEFAULT] := xlDefault;

Apparently the Screen variable is not valid in this situation...[CODE]
Posted 21 Oct, 2014 09:15:37 Top