scroll bar delta

  • Thread starter Thread starter Boni
  • Start date Start date
B

Boni

Dear all,
I have strange problem. I need a scroll bar Value difference
(NewVal -OldVal).
But e.NewValue is the same a scrollbar.value. Do I have to save old value
and build difference myself or do I just misuse the event?
Thank you in advance,
Boni

' Create the Scroll event handler.
Private Sub vScrollBar1_Scroll(sender As Object, e As ScrollEventArgs)
' Display the new value in the label.
label1.Text = "VScrollBar Value:(OnScroll Event) " & _
e.NewValue.ToString()
End Sub
 
Boni said:
Dear all,
I have strange problem. I need a scroll bar Value difference
(NewVal -OldVal).
But e.NewValue is the same a scrollbar.value. Do I have to save old value
and build difference myself or do I just misuse the event?
Thank you in advance,
Boni

' Create the Scroll event handler.
Private Sub vScrollBar1_Scroll(sender As Object, e As ScrollEventArgs)
' Display the new value in the label.
label1.Text = "VScrollBar Value:(OnScroll Event) " & _
e.NewValue.ToString()
End Sub


I would not have a problem with keeping track of the previous value myself. What I do think is a serious bug is the fact that (in VB .net) the scrollbar value "jumps" from where you had set it when you release the "thumb". It is completely useless for setting a precise value by dragging and releasing the "thumb".
 
Back
Top