Compartilhar via


More updates for the VB6/VBA mouse wheel fix

Thanks to Matt Dawdy for not only report the bug but also coding a fix.  The latest fix is for issues where scrolling does not work on some multi-monitor displays.

 

Changes are only for Main.bas:

 

  1. Add the following two functions:

 

Private Function LowWord(ByVal inDWord As Long) As Integer

    LowWord = inDWord And &H7FFF&

    If (inDWord And &H8000&) Then LowWord = LowWord Or &H8000

End Function

Private Function HighWord(ByVal inDWord As Long) As Integer

    HighWord = LowWord(((inDWord And &HFFFF0000) \ &H10000) And &HFFFF&)

End Function

 

  1. In WindowProc remove the following lines:

 

        XPos = lParam And 65535

        YPos = lParam / 65536

        ' Convert the wheel scroll to VScroll

        XPos = lParam And 65535

        YPos = lParam / 65536

 

  1. In WindowProc add the following lines:

        XPos = LowWord(lParam)

        YPos = HighWord(lParam)

Comments

  • Anonymous
    August 29, 2005
    I am hoping your latest version of the addon will fix my current VB6 IDE woes. Where can I download the latest version?