-
Nov 25th, 2006, 12:20 PM
#1
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.
-
Feb 27th, 2007, 08:54 AM
#2
Re: Classic VB - How can I use the mouse-wheel in VB?
Originally Posted by si_the_geek
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.
Last edited by si_the_geek; Aug 21st, 2008 at 02:43 PM.
Reason: updated download link
-
Feb 12th, 2008, 06:27 AM
#3
Re: Classic VB - How can I use the mouse-wheel in VB?
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)
-
Aug 22nd, 2008, 03:26 AM
#4
New Member
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!
-
Jul 30th, 2010, 07:13 PM
#5
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
-
Jul 10th, 2016, 03:56 PM
#6
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.
-
Apr 25th, 2021, 05:16 PM
#7
Addicted Member
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
-
Apr 26th, 2021, 08:28 AM
#8
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|