Will call ther native windows ScvrollWindowEx api if the caller has securoty permissions to call unmanaged code. If not this method will just invalidate the control.
'Declaration
Protected Function ScrollControl( _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Rectangle, _
ByVal As Rectangle, _
ByRef As Rectangle, _
ByVal As Boolean, _
ByVal As Boolean, _
ByVal As Boolean, _
ByVal As Short _
) As Integer
protected int ScrollControl(
int ,
int ,
Rectangle ,
Rectangle ,
ref Rectangle ,
bool ,
bool ,
bool ,
short
)
Parameters
- xAmount
- The amount to scroll left to right.
- yAmount
- The amount to scroll up and down.
- scrollRect
- The portion of the client area to be scrolled
- clipRect
- Only device bits within the clipping rectangle are affected. Bits scrolled from the outside of the rectangle to the inside are painted; bits scrolled from the inside of the rectangle to the outside are not painted.
- updateRect
- Receives the boundaries of the rectangle invalidated by scrolling.
- eraseBackground
- Erases the newly invalidated region by sending a WM_ERASEBKGND message to the window when specified with the invalidate flag is true.
- invalidate
- Invalidates the exposed region after scrolling.
- scrollChildren
- Scrolls all child windows that intersect the scrollRect parameter. The child windows are scrolled by the number of pixels specified by the xAmount and yAmount parameters. The system sends a WM_MOVE message to all child windows that intersect scrollRect, even if they do not move.
- smoothScrollAmount
- If greatern than 0 scrolls using smooth scrolling. The amount is in milliseconds.
Return Value
If the function succeeds, the return value is 2 for SIMPLEREGION (rectangular invalidated region), 3 for COMPLEXREGION (nonrectangular invalidated region; overlapping rectangles), or 1 for NULLREGION (no invalidated region). If the function fails, the return value is 0.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2