Hi You can use these function & com services
Imports System.Runtime.InteropServices.Marshal
Private Shared ScrollVal As Long = 500
Const SBS_HORZ = 0
Const SBS_VERT = 1
Const WM_VSCROLL = &H115
Const WM_HSCROLL = &H114
Const SB_THUMBPOSITION = 4
Public Enum eScrollAction
Jump = 0
Relitive = 1
End Enum
Public Enum eScrollDirection
Vertical = 0
Horizontal = 1
End Enum
Private Declare Function GetScrollPos Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal nBar As Integer) As Integer
Private Declare Function SetScrollPos Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal nBar As Integer, _
ByVal nPos As Integer, _
ByVal bRedraw As Boolean) As Integer
Private Declare Function PostMessageA Lib "user32.dll" ( _
ByVal hwnd As IntPtr, _
ByVal wMsg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Integer) As Boolean
Private Sub scrollControl(ByVal hWnd As IntPtr, ByVal Direction As eScrollDirection, ByVal Action As eScrollAction, ByVal Amount As Integer)
On Error Resume Next
Dim position As Integer
If Direction = eScrollDirection.Horizontal Then
If Action = eScrollAction.Relitive Then
position = GetScrollPos(hWnd, SBS_HORZ) + Amount
Else
position = Amount
End If
If (SetScrollPos(hWnd, SBS_HORZ, position, True) <> -1) Then
PostMessageA(hWnd, WM_HSCROLL, SB_THUMBPOSITION + &H10000 * position, Nothing)
Else
MsgBox("Can't set info (Err: " & GetLastWin32Error() & ")")
End If
Else
If Action = eScrollAction.Relitive Then
position = GetScrollPos(hWnd, SBS_VERT) + Amount
Else
position = Amount
End If
If (SetScrollPos(hWnd, SBS_VERT, position, True) <> -1) Then
PostMessageA(hWnd, WM_VSCROLL, SB_THUMBPOSITION + &H10000 * position, Nothing)
Else
MsgBox("Can't set info (Err: " & GetLastWin32Error() & ")")
End If
End If
End Sub
HOW TO USE :-
scrollControl(control.Handle, eScrollDirection.Vertical, eScrollAction.Jump, ScrollVal)