Mouse load icon after execute Add-In

Mouse load icon after execute Add-In

lvirone
Enthusiast Enthusiast
279 Views
1 Reply
Message 1 of 2

Mouse load icon after execute Add-In

lvirone
Enthusiast
Enthusiast

Hello,

 

An Add-In I made change the mouse icon to "load" (only the blue circle) after result.Failed. I don't really know what I did to make this change, but it stays for all Revit session. Is there a way to force the mouse icon in Revit ?

 

I must specify this behavior occurs in these 2 areas (in red rectangles):

Problem.png

 

Thanks

 

EDIT: Using Mouse.OverrideCursor solve the problem https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.mouse.overridecursor?view=windowsd...

0 Likes
Accepted solutions (1)
280 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni
Accepted solution

Well, of course the .NET environment does include functionality to control the cursor icon. You can find it by searching the Internet, e.g., for something like ".net cursor icon":

  

  

However, that sounds like treatment of the symptom instead of addressing the cause. I suggest that you analyse your add-in more carefully to find out what is causing this symptom in the first place. For instance, you could comment out all of your code, verify that the cursor remains in its intended state, and then uncomment bit and pieces step by step to discover what section is causing the problem. Then you can treat and fix the root cause.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes