Console.MoveBufferArea Method (Int32, Int32, Int32, Int32, Int32, Int32)

Copies a specified source area of the screen buffer to a specified destination area.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static void MoveBufferArea(
	int sourceLeft,
	int sourceTop,
	int sourceWidth,
	int sourceHeight,
	int targetLeft,
	int targetTop
)

Parameters

sourceLeft
Type: System.Int32

The leftmost column of the source area.

sourceTop
Type: System.Int32

The topmost row of the source area.

sourceWidth
Type: System.Int32

The number of columns in the source area.

sourceHeight
Type: System.Int32

The number of rows in the source area.

targetLeft
Type: System.Int32

The leftmost column of the destination area.

targetTop
Type: System.Int32

The topmost row of the destination area.

ExceptionCondition
ArgumentOutOfRangeException

One or more of the parameters is less than zero.

-or-

sourceLeft or targetLeft is greater than or equal to BufferWidth.

-or-

sourceTop or targetTop is greater than or equal to BufferHeight.

-or-

sourceTop + sourceHeight is greater than or equal to BufferHeight.

-or-

sourceLeft + sourceWidth is greater than or equal to BufferWidth.

SecurityException

The user does not have permission to perform this action.

IOException

An I/O error occurred.

If the destination and source parameters specify a position located outside the boundaries of the current screen buffer, only the portion of the source area that fits within the destination area is copied. That is, the source area is clipped to fit the current screen buffer.

The MoveBufferArea method copies the source area to the destination area. If the destination area does not intersect the source area, the source area is filled with blanks using the current foreground and background colors. Otherwise, the intersected portion of the source area is not filled.

.NET Framework

Supported in: 4.6, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft