Hi Guys,
this may seem like a striaght forward question for most but im having difficulties hiding the panels horizontial scroll bar.
Ok, what im attempting to achieve is:
1. keep horizontal scroll bar hidden on a standard panel control
2. allow the user to drag to scroll the panel
use the link below to view the issue im seeing
http://i1106.photobucket.com/albums/h366/deery5000/Capture_zpsc41edfed.png
code
'drag events
any help would be great
Kevin
this may seem like a striaght forward question for most but im having difficulties hiding the panels horizontial scroll bar.
Ok, what im attempting to achieve is:
1. keep horizontal scroll bar hidden on a standard panel control
2. allow the user to drag to scroll the panel
use the link below to view the issue im seeing
http://i1106.photobucket.com/albums/h366/deery5000/Capture_zpsc41edfed.png
code
'Panel Settings
Panel2.AutoScroll = True
Panel2.VerticalScroll.Visible = False
Panel2.HorizontalScroll.Visible = False
'drag events
Private Sub Panel2_MouseDown_1(sender As Object, e As MouseEventArgs) Handles Panel2.MouseDown
'Capture the initial point
m_PanStartPoint = New Point(e.X, e.Y)
End Sub
Private Sub Panel2_MouseMove(sender As Object, e As MouseEventArgs) Handles Panel2.MouseMove
'Verify Left Button is pressed while the mouse is moving
If e.Button = Windows.Forms.MouseButtons.Left Then
'Here we get the change in coordinates.
Dim DeltaX As Integer = (m_PanStartPoint.X - e.X)
Dim DeltaY As Integer = (m_PanStartPoint.Y - e.Y)
'Then we set the new autoscroll position.
'ALWAYS pass positive integers to the panels autoScrollPosition method
Panel2.AutoScrollPosition = _
New Drawing.Point((DeltaX - Panel2.AutoScrollPosition.X), _
(DeltaY - Panel2.AutoScrollPosition.Y))
End If
End Sub
any help would be great
Kevin