How to prevent MouseWheel msgs from auto-generating scrollbar msgs?

  • 12 years ago

    I have a VirtualMode DataGridView that bogs down on using the mouse wheel to scroll and gets a backlog of messages such that it continues to scroll long after ceasing to turn the mouse wheel. This is because instead of generating one scrollbar message for each mouse wheel message it generates a separate scrollbar message for each line move, forcing the entire screen to refresh with each line added.

    I've put in code to scroll multiple lines only once for each mouse wheel click, but I'm still having to shunt out all of the extra scrollbar messages and it is not easy. If I get out of sync as to how many scrollbar messages to shunt the scrolling goes out of whack. It would be far easier if I just didn't have to worry about shunting these useless messages.

    So how do you prevent mouse wheel messages from creating scrollbar messages?

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”