dcsimg
Results 1 to 6 of 6

Thread: Classic VB - How can I use the mouse-wheel in VB?

  1. #1

    Thread Starter
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,146

    Classic VB - How can I use the mouse-wheel in VB?

    VB6 was released in 1998, before mice with wheels were generally available. Due to this, there is no built-in support for the mouse-wheel within most of VB6 (either in VB itself, or in your programs).


    The code window in VB cannot be scrolled with the wheel, which can be frustrating! Luckily this can be 'fixed' fairly easily, see the following Microsoft article for instructions: http://support.microsoft.com/kb/837910


    To make use of the mouse-wheel in your program (including several of the built-in controls) you will need to write fairly complex code, incorporating a few API's.

    This may sound a bit daunting, but in the CodeBank forum there is a great piece of code already written for you: VB6 - MouseWheel with Any Control.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,135

    Re: Classic VB - How can I use the mouse-wheel in VB?

    Quote Originally Posted by si_the_geek
    ...Luckily this can be 'fixed' fairly easily, see the following Microsoft article for instructions: http://support.microsoft.com/kb/837910
    After many attemps I dumped it - couldn't get it done. So, in my opinion it's just doesn't work.
    However, there is another utility made by Logitech (Mouseware) that actually works without any problem on any platform and is very simple to configure - you simply install it by running the Setup file.
    It could be downloaded directly from Logitech.

  3. #3
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Classic VB - How can I use the mouse-wheel in VB?

    Quote Originally Posted by RhinoBull
    After many attemps I dumped it - couldn't get it done. So, in my opinion it's just doesn't work....
    Maybe it didn't work at that time but I just tried it out and it worked.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  4. #4
    New Member danisa's Avatar
    Join Date
    Aug 2008
    Posts
    13

    Resolved Re: Classic VB - How can I use the mouse-wheel in VB?

    Here is my two cents...
    The MS Fix works...BUT it manage to full me for a while.

    Download the MouseFix file from the MS link above.

    Extract the downloaded file to temp folder...
    Copy VB6IDEMouseWheelAddin.dll from temp folder to C:\
    Click Start, click Run, and type or copy paste from here:

    regsvr32 C:\VB6IDEMouseWheelAddin.dll

    then click OK.

    Start Visual Basic 6.0.
    Click Add-Ins in the Toolbar, and then click Add-in Manager from the drop down menu.
    In the Add-in Manager list, click "MouseWheel Fix".
    Click to select the "Loaded/Unloaded" check box, and
    then click to select the "Load on Startup" check box.
    Click OK.
    Done
    Now the rodent should work ok and scroll up/down in VB6

    Notes:
    You only need the DLL registered.
    The VB project that comes with the download did't work for me.
    Also "regsvr32" did'n want to register the DLL from within a subfolder, so I went for C:\ , the right place for it should be in VB itself I think.
    go figure....

    @danisa

    p.s. Thanks for updating the links to Logitech...
    I'm done now so won't need it...but some poor soul may!

  5. #5
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Classic VB - How can I use the mouse-wheel in VB?

    The steps danisa posted work fine.

    Just to note for Vista/7 users, instead of

    Click Start, click Run, and type or copy paste from here:

    regsvr32 C:\VB6IDEMouseWheelAddin.dll

    then click OK.
    Do this:

    - Open Start Menu, type cmd. In the upper left corner you should get 'cmd.exe'
    - Right-click on cmd.exe and choose Run as administartor
    - In the command prompt that opens execute: regsvr32 C:\VB6IDEMouseWheelAddin.dll

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    5,693

    Re: Classic VB - How can I use the mouse-wheel in VB?

    My two-cents on this one.

    I've used the VB6ScrollWheelFix for a couple of years now.

    It's nice in that it works with a split-code-window (working correctly in whichever split-section has the focus. It's the only one I've seen that does that correctly.

    It works rather flawlessly for me.

    Also Joe gives away the source code, so you can see what it's doing.

    Here's the link to download it:
    http://www.joebott.com/vb6scrollwheel.htm
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width