ControlPaint.DrawSelectionFrame Method (Graphics, Boolean, Rectangle, Rectangle, Color)

 
System_CAPS_noteNote

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

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)

static member DrawSelectionFrame : 
        graphics:Graphics *
        active:bool *
        outsideRect:Rectangle *
        insideRect:Rectangle *
        backColor:Color -> unit

Parameters

graphics
Type: System.Drawing.Graphics

The Graphics to draw on.

active
Type: System.Boolean

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

outsideRect
Type: System.Drawing.Rectangle

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

insideRect
Type: System.Drawing.Rectangle

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

backColor
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
Available since 1.1
Return to top
Show: