Export (0) Print
Expand All

ControlPaint.DrawSelectionFrame Method

Draws a standard selection frame in the specified state, on the specified graphics surface, with the specified inner and outer dimensions, and with the specified background color.

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

public static void DrawSelectionFrame(
	Graphics graphics,
	bool active,
	Rectangle outsideRect,
	Rectangle insideRect,
	Color backColor


Type: System.Drawing.Graphics

The Graphics to draw on.

Type: System.Boolean

true to draw the selection frame in an active state; otherwise, false.

Type: System.Drawing.Rectangle

The Rectangle that represents the outer boundary of the selection frame.

Type: System.Drawing.Rectangle

The Rectangle that represents the inner boundary of the selection frame.

Type: System.Drawing.Color

The Color of the background behind the frame.

A selection frame is a frame that is drawn around a selected component at design time.

The backColor parameter is used to calculate the fill color of the frame so that it is always visible against the background.

If the active parameter is set to true, the selection frame is drawn as a set of hatch marks indicating that the component has been activated; otherwise, the selection frame is drawn with a dotted pattern or nothing, depending on the implementation.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.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.

© 2014 Microsoft