none
How to set Mouse Cursor in VSTO AddIn? RRS feed

  • Question

  • Hi All,

    I faced an issue regarding how to set the cursor in a VSTO AddIn, I know how to set it in WinForm and WPF applicaiton. When user clicked the Ribbon button, In the scope of current document, the Mouse's cursor will display a custom cursor, not the default arrow or wait.

    How to achieve this goal? Could you please give me some hits?

    Thanks in advance.

    Ricky Yan,

    Monday, December 15, 2014 3:43 AM

Answers

  • Hello Ricky,

    Where and when do you need to set a custom cursor? Could you please be more specific?

    You may find the SetCursor function helpful.

    • Marked as answer by Terrence-Jones Wednesday, December 17, 2014 6:12 AM
    Monday, December 15, 2014 11:29 AM
  • Hi Ricky,

    You could  call the Range.Select method to set focus on the specified range, so that you can insert something in the current selected position or let the user input something. This will work for Excel or Word, for Power presentation, it's similar.

    Check this thread which has some useful document links about this:

    Set the cursor's position


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Terrence-Jones Tuesday, December 16, 2014 10:00 AM
    Tuesday, December 16, 2014 9:32 AM
    Moderator

All replies

  • Anybody known?
    Monday, December 15, 2014 9:04 AM
  • Hello Ricky,

    Where and when do you need to set a custom cursor? Could you please be more specific?

    You may find the SetCursor function helpful.

    • Marked as answer by Terrence-Jones Wednesday, December 17, 2014 6:12 AM
    Monday, December 15, 2014 11:29 AM
  • Hi Ricky,

    You could  call the Range.Select method to set focus on the specified range, so that you can insert something in the current selected position or let the user input something. This will work for Excel or Word, for Power presentation, it's similar.

    Check this thread which has some useful document links about this:

    Set the cursor's position


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Terrence-Jones Tuesday, December 16, 2014 10:00 AM
    Tuesday, December 16, 2014 9:32 AM
    Moderator
  • Thank you Eugene and Caillen.
    Wednesday, December 17, 2014 6:12 AM