R
Rlrcstr
Can anyone point me to an example of using the GetScrollInfo API call from VB .NET? I've got it coded based on some stuff I've found, but I always get error 126 (The specified module could not be found.). I'm not sure if I've got the Declare wrong or the structure or what... Thanks.
Jerry
Declare:
Public Declare Function GetScrollInfo Lib "user32" Alias "GetScrollInfo" ( _
ByVal hWnd As IntPtr, _
ByVal nBar As Integer, _
<MarshalAs(UnmanagedType.Struct)> ByRef lpScrollInfo As SCROLLINFO) As Integer
Structure:
<StructLayout(LayoutKind.Sequential)> Public Structure SCROLLINFO
Public cbSize As Integer
Public fMask As Integer
Public nMin As Integer
Public nMax As Integer
Public nPage As Integer
Public nPos As Integer
Public nTrackPos As Integer
End Structure
Call:
result = GetScrollInfo(txtDisplay.Handle, SB_VERT, sInfo)
Jerry
Declare:
Public Declare Function GetScrollInfo Lib "user32" Alias "GetScrollInfo" ( _
ByVal hWnd As IntPtr, _
ByVal nBar As Integer, _
<MarshalAs(UnmanagedType.Struct)> ByRef lpScrollInfo As SCROLLINFO) As Integer
Structure:
<StructLayout(LayoutKind.Sequential)> Public Structure SCROLLINFO
Public cbSize As Integer
Public fMask As Integer
Public nMin As Integer
Public nMax As Integer
Public nPage As Integer
Public nPos As Integer
Public nTrackPos As Integer
End Structure
Call:
result = GetScrollInfo(txtDisplay.Handle, SB_VERT, sInfo)