• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

How do you make the VScroll1 control respond to mousewheel scrolling?

I can't seem to make the VScroll1 control respond to mousewheel movement.  Any suggestions?  Thnx.
0
larrysy
Asked:
larrysy
  • 2
  • 2
2 Solutions
 
vb_elmarCommented:
You need the following small Tool "VBScroll" (Version 1.3.1 - VBScroll.zip 26 KB)

http://www.gasanov.net/VBScroll.htm
0
 
larrysyAuthor Commented:
Try the following code - 3 controls - Picture 1, Picture2, and VScroll1, Picture2 is inside Picture 1. If you run it, the scrollbar wont respond to a mousewheel scroll.  I need some code which can be included in the compiled .exe.

Private Sub Form_Load()
Picture1.Move 0, 0
Picture2.Move 0, 0
Picture2.Height = Picture1.Height * 2
Picture2.Width = Picture1.Width
Me.Width = Picture1.Width + VScroll1.Width + 150
Me.Height = Picture1.Height + 1000
With VScroll1
   .Top = 0
   .Left = Picture1.Width
   .Height = Picture1.Height
End With
VScroll1.Max = Picture2.Height - Picture1.Height
VScroll1.LargeChange = VScroll1.Max / 10
VScroll1.SmallChange = 100
End Sub

Private Sub VScroll1_Change()
Picture2.Top = -VScroll1.Value
End Sub

Private Sub VScroll1_Scroll()
VScroll1_Change
DoEvents
End Sub
0
 
Erick37Commented:
Here are a couple samples of how to deal with the WM_MOUSEWHEEL message in VB6:

Adding Scroll Bars to Forms, PictureBoxes and User Controls
http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Adding_Scroll_Bars_To_Forms__PictureBoxes_and_UserControls/article.asp

How to implement additional support for wheel mice in VB6
http://www.adit.co.uk/html/mousewheelsupport.html
0
 
vb_elmarCommented:
I checked your sample, larrysy - Only when  running the "intellipoint" software, then it scrolls !

You need the "intellipoint" mouse software (Microsoft). The following picture shows several mouse types:

<img src="http://home.arcor.de/u101143665/intellimouse.JPG">

Download Microsoft's "intellipoint" mouse software:

URL:
http://www.microsoft.com/hardware/mouseandkeyboard/Download.mspx

0
 
larrysyAuthor Commented:
Thanks vb_elmar and Erick37, I finally settled on the adit.co.uk example.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now