Re: strange behaviour with vertical scrollbar

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Peter" <-> wrote in message
news:%23XYy%23OuZJHA.5772@xxxxxxxxxxxxxxxxxxxxxxx
Dear all
On my form I have a vertical scrollbar(VScroll1) and often(but not always)
I see strange behaviours:
If I press the up-arrow or the down-arrow(small change) of the Vscroll
control with the mouse then the slider is moving upwards or downwards as
expected.
If I press on the area between the arrow and the slider(large change) then
the following is happening:
sometimes the area between the arrow and the slider turns black and stays
black
sometimes it turns black but then changes to grey again.
If the area has turned black then sometimes if I just move the mouse over
the black area then the slider is moving without any mouse clicks. This
has happend only upwards so far, if the area has turned black in the lower
part of the vscroll control then moving the mouse over that area has never
moved the slider without any mouseclicks.
How can I prevent this?
I already put the following code into VScroll1_GotFocus event:
Picture1.Setfocus
to prevent blinking of the slider.
Both .SmallChange and .LargeChange properties are set to 1.

How long does it take for Change/Scroll event code to execute? You may want
to add test code:

Private Sub VScroll1_Change()
Dim t As Single

t = Timer

' Some code

Debug.Print "VScroll1_Change: Time taken " & Timer - t
End Sub

Try adding the following code as well to see if anything makes the scrollbar
lose focus:

Private Sub VScroll1_LostFocus()
Debug.Print "VScroll1_LostFocus called"
End Sub



.



Relevant Pages

  • Slider Control Not moving the records to next record on form
    ... I added a slider on my form. ... I have the following libraries: ... Private Sub Form_ApplyFilter ... Dim lMove As Long ...
    (microsoft.public.access.formscoding)
  • Re: Slider Bar for Survey
    ... > I was able to replicate this slider control and it works well. ... > anyway to associate numeric values to where the user clicks on the slider. ... >> Private Sub lblBackground_MouseDown(Button As Integer, Shift As Integer, X ...
    (microsoft.public.access.forms)
  • Re: Slider to move through Records on form
    ... Dim fRecordCountChanged As Boolean ... Private Sub Form_ApplyFilter ... Dim lMove As Long ... Sets the Min and Max of the slider when the form opens. ...
    (microsoft.public.access.formscoding)
  • Re: Setting slider value
    ... Do you have any code in any of the Events of the slider control? ... Private Sub Command1_Click ... >> If you're doing it in a loop, you'll need to add a DoEvents inside that ...
    (microsoft.public.vb.controls)
  • dynamic modelling addin - excelsior?
    ... This addin gave an ability to represent values to controls on a page so ... slider for "wattage of light bulb" and a dial showing cost per hour. ... moving either of the sliders would show the needle on the dial moving ... tony h's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=21074 ...
    (microsoft.public.excel.misc)