ControlPaint.DrawSelectionFrame 方法

定义

在指定的图形表面上,按指定的内部与外部尺寸和指定的背景色绘制处于指定状态的标准选择框架。

public:
 static void DrawSelectionFrame(System::Drawing::Graphics ^ graphics, bool active, System::Drawing::Rectangle outsideRect, System::Drawing::Rectangle insideRect, System::Drawing::Color backColor);
public static void DrawSelectionFrame (System.Drawing.Graphics graphics, bool active, System.Drawing.Rectangle outsideRect, System.Drawing.Rectangle insideRect, System.Drawing.Color backColor);
static member DrawSelectionFrame : System.Drawing.Graphics * bool * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Drawing.Color -> unit
Public Shared Sub DrawSelectionFrame (graphics As Graphics, active As Boolean, outsideRect As Rectangle, insideRect As Rectangle, backColor As Color)

参数

graphics
Graphics

要进行绘制的 Graphics

active
Boolean

若要绘制处于活动状态的选择框架,则为 true;否则为 false

outsideRect
Rectangle

代表选择框架外边界的 Rectangle

insideRect
Rectangle

代表选择框架内边界的 Rectangle

backColor
Color

框架的背景的 Color

注解

选择框架是在设计时围绕所选组件绘制的框架。

backColor 参数用于计算框架的填充颜色,以便始终对背景可见。

active如果参数设置为 true,则选择帧将绘制为一组阴影标记,指示组件已激活;否则,选择框使用虚线模式或无任何内容绘制,具体取决于实现。

适用于