MonteCristo33
asked on
How to make two vertical scroll bars behave identically on a form.
Hi Experts,
I have two vertical scroll bars on my form and I would like the second scroll bar to replicate everything the 1st one does and vice versa. In other words, if I scroll down on the 1st scroll bar, the cursor on the 2nd scroll bar should follow and stop at the exact same position, and conversely.
I tried the .scroll event handling the two scrollbars in the same sub, but that did not work.
Any suggestions? Is it even feasible?
Many thanks in anticipation.
MC
I have two vertical scroll bars on my form and I would like the second scroll bar to replicate everything the 1st one does and vice versa. In other words, if I scroll down on the 1st scroll bar, the cursor on the 2nd scroll bar should follow and stop at the exact same position, and conversely.
I tried the .scroll event handling the two scrollbars in the same sub, but that did not work.
Any suggestions? Is it even feasible?
Many thanks in anticipation.
MC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear Idle Mind,
Thanks for your contribution. I have manually added the 2 scroll bars to my form. I assume the code above will work with the scrollbars manually added. Let me try and I'll get back to you.
MC
Thanks for your contribution. I have manually added the 2 scroll bars to my form. I assume the code above will work with the scrollbars manually added. Let me try and I'll get back to you.
MC
It worked for me in VB.Net 2008. I added two VScrollBars to my form (VScrollBar1 & VScrollBar2).
I tested it with about ten scrollbars at the same time just to make it sure worked though... =)
I tested it with about ten scrollbars at the same time just to make it sure worked though... =)
ASKER
Another great one from Idle Mind.
Thanks!
Thanks!
(not using an AutoScroll on a container).