User32SetScrollInfo(IntPtr, ScrollBarOrientation, ScrollInfo, Boolean) Method
Sets the parameters of a scroll bar, including the minimum and maximum scrolling positions,
the page size, and the position of the scroll box (thumb).
The function also redraws the scroll bar, if requested.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static int SetScrollInfo(
IntPtr hWnd,
ScrollBarOrientation bar,
ref ScrollInfo refScrollInfo,
bool redraw
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function SetScrollInfo (
hWnd As IntPtr,
bar As ScrollBarOrientation,
ByRef refScrollInfo As ScrollInfo,
redraw As Boolean
) As Integer
Dim hWnd As IntPtr
Dim bar As ScrollBarOrientation
Dim refScrollInfo As ScrollInfo
Dim redraw As Boolean
Dim returnValue As Integer
returnValue = User32.SetScrollInfo(hWnd,
bar, refScrollInfo, redraw)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static int SetScrollInfo(
IntPtr hWnd,
ScrollBarOrientation bar,
ScrollInfo% refScrollInfo,
bool redraw
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member SetScrollInfo :
hWnd : IntPtr *
bar : ScrollBarOrientation *
refScrollInfo : ScrollInfo byref *
redraw : bool -> int
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to a scroll bar control or a window with a standard scroll bar,
depending on the value of the bar parameter.
- bar ScrollBarOrientation
-
Specifies the type of scroll bar for which to set parameters.
- refScrollInfo ScrollInfo
-
Pointer to a ScrollInfo structure.
Before calling SetScrollInfo(IntPtr, ScrollBarOrientation, ScrollInfo, Boolean),
set the SizeOfStruct member to Marshal.SizeOf(Of ScrollInfo),
and set the Mask member to specify the scroll bar parameters to set,
and specify the new parameter values in the appropriate members
- redraw Boolean
-
Specifies whether the scroll bar is redrawn to reflect the changes to the scroll bar.
If this parameter is , the scroll bar is redrawn, otherwise, it is not redrawn.
Int32
The return value is the current position of the scroll box.