VB6 MouseWheel Fix via Add-in

Thanks to dredge, today I discovered a solution for THE problem that plagued me since I started programming in VB6...

The VB6 MouseWheel Fix!!!


Now when I have to maintain my old VB6 projects I feel much more confortable... 🙂

UPDATE: Many Thanks to robgruen, the original developer of the fix!


[Via Lorenzo Barbieri] Good times for people that still need VB6. I hear there are a lot of them... 🙂 Josh

Comments (11)

  1. James Hancock says:

    Now if only MS would go back to the way Intellimouse worked under Windows 9x around Version 1 or 2 of it where it scrolled whatever thing your mouse was over instead of requiring you to click on the thing first.

    The way it is now is a pain in the butt! I wish there was some sort of registry thing to set it so that the mouse wheel scrolled whatever was under the cursor instead of whatever has the focus… man that would be a time saver!

  2. James Hancock says:

    BTW. in Windows 9x with intellimouse installed the VB6 code window scrolls perfectly and does so when you have the cursor over it… this of course is the way it should be no matter what! Why the step back in NT?

  3. jledgard says:

    Not sure I can help you there. On my XP box the mouse scroll just works with whatever has focus like you describe. Perhaps there is some setting on your machine that changed this?

  4. Edward says:

    Support for VB6 scrolling was included in intellipoint up to version 3.5. It was taken out from 4.9 which shipped with the Bluetooth mice, and 5.0 the current version that has support for the new sideways scrolling mice.

    For some reason, that no one can explain, support for per-app customisations of buttons 4 and 5 was also removed from intellipoint 4.9 and 5.0.

    I tried a fix for VB6 scrolling before and it just made VB crash more often. Not sure if it was the same one as this.

    Why couldn’t they have added proper scrolling support back with VB6 SP6? There are going to be a lot of people that will be stuck using VB6 to support legacy code for a good long while yet.

  5. James Hancock says:

    Yes, if the thing has the focus the wheel works fine. However, what I’m talking about is scrolling whatever your cursor is over, not what has the focus. It was so intuitive and wonderful back in the Win 9x + Intellimouse days, and now it’s gone :<

    I know it can be done, because I’ve used a touch pad on a laptop that you can set it to do that… bring it back please MS!

  6. jledgard says:

    Ah, I actually preffer it this way. No offense. Maybe it should be an option. Have to take it up with the windows guys though. 🙂

  7. James Hancock says:

    That’s what I was suggesting 🙂 Make it an option!

  8. achow says:

    Why not just install the tweakUI powertoy for windows and set your mouse to give focus to whatever it floats over? (ie: Unix style)

  9. anonymous says:

    In the file Main.bas, there is a function EnumChildProc.

    Change the if and else if statement to the following (Fixes a crash in program):

    If IsVerticalScrollBar(lhWnd) = True And GetParent(lhWnd) = pthWnd And pthWnd <> 0 Then ‘ TextBox Window

    ElseIf IsHorizontalScrollBar(lhWnd) = True And GetParent(lhWnd) = pthWnd And pthWnd <> 0 Then

  10. anonymous says:

    And add the declaration at the top:

    Public Declare Function GetParent Lib "user32" (ByVal hWnd As Long) As Long

Skip to main content