By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 2,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

Click on Scroll Bar and Drag to Scroll

P: 1
Below code works for me under VS 2008,
try it, probably might also work for you !

Expand|Select|Wrap|Line Numbers
  1. Private Sub PanelRemark_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles PanelRemark.Scroll
  2.         If e.ScrollOrientation = ScrollOrientation.VerticalScroll Then
  3.             PanelRemark.AutoScrollPosition = New Point(PanelRemark.AutoScrollPosition.X, _
  4.                                                                                     e.NewValue)
  5.             Exit Sub
  6.         End If
  7.         If e.ScrollOrientation = ScrollOrientation.HorizontalScroll Then
  8.             PanelRemark.AutoScrollPosition = New Point(e.NewValue, _
  9.                                                                                     -PanelRemark.AutoScrollPosition.Y)
  10.             Exit Sub
  11.         End If
  12.     End Sub
Aug 2 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.