Results 1 to 8 of 8

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,927

    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,132

    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
    9,817

    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. To all, peace and happiness.

  7. #7
    Lively Member
    Join Date
    Jan 2009
    Location
    Mn-USA
    Posts
    124

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

    I want to comment on this post at a very late date.

    As I understand it, the mouse wheel is involved in three different processes:
    Running under the VB IDE
    Executing code under VB IDE
    Executing from compiled .exe

    I'm confused as to which of the 3 above does the KB 837910 affect, and how.

    Coding for a compiled executable is very complicated. Code that I incorporated 15 years ago no longer works the same.
    There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!
    Richard P. Feynman

  8. #8
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

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

    The fix in the context of this thread was scrolling code within the VB6 IDE.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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



Click Here to Expand Forum to Full Width