ScrollableControl::SetDisplayRectLocation Method (Int32, Int32)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Positions the display window to the specified value.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

void SetDisplayRectLocation(
	int x,
	int y


Type: System::Int32

The horizontal offset at which to position the ScrollableControl.

Type: System::Int32

The vertical offset at which to position the ScrollableControl.

If the AutoScroll property is set to true, the DisplayRectangle property is the virtual size and position displayed client area of the ScrollableControl. Call the SetDisplayRectLocation method to scroll through the ScrollableControl to the specified position.

Notes to Callers:

SetDisplayRectLocation does not update the position of the scroll bars. To update the scroll bars, call the AdjustFormScrollbars method.

.NET Framework
Available since 1.1
Return to top