VB.NET2003 MouseWheel on a panel?

How do I make the mouse wheel scroll a panel that scrolls I have more control than can fit, and AutoScroll set to true, so scrollbars do appear. But the mouse wheel doesn't scroll the contents up/down or left/right.

Answer this question

VB.NET2003 MouseWheel on a panel?

  • Thierry Nenin

    Yes! Works a treat.
    However I've seen some apps that after a panel or scrolling box cannot scroll further in the direction of the wheel, the next most likely window that has scrolling capability begins to scroll. Is what I am seeing in these apps (sorry, can't remember a specific example) actually not "correct"

  • Mark Rodenhauser

    I have seen that behavior before in Internet Explorer. If a div contains a scroll bar and you place the mouse wheel over the top and use it to scroll to the bottom of it, the page begins to scroll.

    However, I believe that this is custom behaviour.



  • pig30n

    For the MouseWheel to scroll the scrollbar in a panel, one of its child controls must have focus.



  • VB.NET2003 MouseWheel on a panel?