locked
Spy++ help / Can't get the message for OneNote RRS feed

  • Question

  • Hello,
    i need to get the message for scrolling in OneNote because i want to use SendMessage to control it.

    I already have the right message for i.e Word to work with it.
    I get the messages by clicking the left mouse button in different areas in OneNote except the scrolling. I guess it's processed differently (Nothing appears by scrolling).

    How can this be explained and how could i solve it?


    • Edited by ILT5000 Tuesday, August 25, 2020 11:57 PM
    • Moved by CoolDadTx Wednesday, August 26, 2020 2:43 PM Not C# related
    Tuesday, August 25, 2020 11:49 PM

Answers

  • If i tested it right, there is no message in OneNote in Office 2019, only in 2016. Tested it with Spy++ (32 and 64 bit). Don't know what's behind it.

    Thank you.

    • Marked as answer by ILT5000 Saturday, September 19, 2020 7:40 PM
    Saturday, September 19, 2020 7:40 PM

All replies

  • Hi ILT5000,

    Thank you for posting here.

    According to the description in this link, the scrolling work of OneNote seems to be different from other windows applications, I am afraid this can not be changed by c# code.

    Maybe you can get more help here:

    Microsoft 365 and Office

    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 26, 2020 9:13 AM
  • If you're talking about this window (yellow rectangle),

    it can be scrolled with UI Automation (you can test with Inspect tool from MS SDK)

    Wednesday, August 26, 2020 9:30 AM
  • Thanks for the UI Automation hint.

    Is it possible with UI Automation to scroll in any application by dynamic detection like "GetCursorPos" and "SendInput"?

    I played a little bit around with the Inspect tool and looked for the properties and concrete examples but couldn't find any good examples.

    Refering to: Unwanted delays in scrolling by SendInput (here in this forum) 


    • Edited by ILT5000 Wednesday, September 2, 2020 11:19 AM
    Wednesday, September 2, 2020 10:57 AM
  • It depends on properties, like

    ScrollPattern.ScrollPatternInformation.VerticallyScrollable

    If I test Inspect with Notepad, the property Scroll.VerticallyScrollable becomes true only when there are enough text in the Edit control so that the vertical Scrollbar appears

    Wednesday, September 2, 2020 2:25 PM
  • If i tested it right, there is no message in OneNote in Office 2019, only in 2016. Tested it with Spy++ (32 and 64 bit). Don't know what's behind it.

    Thank you.

    • Marked as answer by ILT5000 Saturday, September 19, 2020 7:40 PM
    Saturday, September 19, 2020 7:40 PM