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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

Int32
The return value is the current position of the scroll box.

Remarks

See Also