Version

ScrollControl Method (UltraControlBase)

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.
Syntax
'Declaration
 
Protected Function ScrollControl( _
   ByVal xAmount As Integer, _
   ByVal yAmount As Integer, _
   ByVal scrollRect As Rectangle, _
   ByVal clipRect As Rectangle, _
   ByRef updateRect As Rectangle, _
   ByVal eraseBackground As Boolean, _
   ByVal invalidate As Boolean, _
   ByVal scrollChildren As Boolean, _
   ByVal smoothScrollAmount As Short _
) As Integer
protected int ScrollControl( 
   int xAmount,
   int yAmount,
   Rectangle scrollRect,
   Rectangle clipRect,
   ref Rectangle updateRect,
   bool eraseBackground,
   bool invalidate,
   bool scrollChildren,
   short smoothScrollAmount
)

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.
Requirements

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

See Also