ControlPaint ControlPaint ControlPaint ControlPaint Class

定义

提供用于绘制常用 Windows 控件及其元素的方法。Provides methods used to paint common Windows controls and their elements. 此类不能被继承。This class cannot be inherited.

public ref class ControlPaint sealed
public sealed class ControlPaint
type ControlPaint = class
Public NotInheritable Class ControlPaint
继承
ControlPaintControlPaintControlPaintControlPaint

示例

下面的代码示例使用ControlPaint构造函数之一来绘制平面Button控件。The following code example uses one of the ControlPaint constructors to draw a flat Button control.

#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;
public ref class Form1: public Form
{
private:
   Button^ button1;
   Button^ button2;

public:
   Form1()
   {
      button1 = gcnew Button;
      button2 = gcnew Button;
      this->button2->Location = Point(0,button1->Height + 10);
      this->Click += gcnew EventHandler( this, &Form1::button2_Click );
      this->Controls->Add( this->button1 );
      this->Controls->Add( this->button2 );
   }


private:

   void button2_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      
      // Draws a flat button on button1.
      ControlPaint::DrawButton( System::Drawing::Graphics::FromHwnd( button1->Handle ), 0, 0, button1->Width, button1->Height, ButtonState::Flat );
   }

};


[STAThread]
void main()
{
   Application::Run( gcnew Form1 );
}

using System;
using System.Drawing;
using System.Windows.Forms;

public class Form1 : Form
{
    private Button _button1 = new Button();
    private Button _button2 = new Button();


    [STAThread]
    static void Main()
    {
        Application.Run(new Form1());
    }

    public Form1()
    {
        _button2.Location = new Point(0, _button1.Height + 10);
        this.Click += Button2_Click;
        this.Controls.Add(_button1);
        this.Controls.Add(_button2);
    }

    private void Button2_Click(object sender, System.EventArgs e)
    {
        // Draws a flat button on button1.
        ControlPaint.DrawButton(
            System.Drawing.Graphics.FromHwnd(_button1.Handle), 0, 0, 
            _button1.Width, _button1.Height,
            ButtonState.Flat);
    }

}
Imports System.Drawing
Imports System.Windows.Forms

    Public Class Form1
        Inherits System.Windows.Forms.Form

        Private button1 As System.Windows.Forms.Button = New Button
        Private button2 As System.Windows.Forms.Button = New Button

        <System.STAThreadAttribute()>  _
        Public Shared Sub Main()
            System.Windows.Forms.Application.Run(New Form1)
        End Sub

        Public Sub New()
            Me.button2.Location = New Point(0, button1.Height + 10)
            AddHandler Me.button2.Click, AddressOf Me.button2_Click
            Me.Controls.Add(Me.button1)
            Me.Controls.Add(Me.button2)
        End Sub

        Private Sub button2_Click(sender As Object, e As System.EventArgs)
            ' Draws a flat button on button1.
            ControlPaint.DrawButton(System.Drawing.Graphics.FromHwnd(button1.Handle), 0, 0, button1.Width, button1.Height, ButtonState.Flat)
        End Sub
End Class

注解

ControlPaint类中包含的方法使您可以绘制自己的控件或控件的元素。The methods contained in the ControlPaint class enable you to draw your own controls or elements of controls. 如果UserPaint控件的位设置为true , 则可以控制自己的控件的绘图。You can control the drawing of your own controls if the UserPaint bit is set to true for the control. 可以通过调用GetStyleSetStyle方法获取或设置样式位。You can get or set the style bits by calling the GetStyle or SetStyle methods. 可以为任何控件设置多个样式位。You can set multiple style bits for any control. ControlStyles枚举成员可以与按位运算组合在一起。The ControlStyles enumeration members can be combined with bitwise operations.

属性

ContrastControlDark ContrastControlDark ContrastControlDark ContrastControlDark

获取用作 ControlDark 颜色的颜色。Gets the color to use as the ControlDark color.

方法

CreateHBitmap16Bit(Bitmap, Color) CreateHBitmap16Bit(Bitmap, Color) CreateHBitmap16Bit(Bitmap, Color) CreateHBitmap16Bit(Bitmap, Color)

创建 16 位颜色位图。Creates a 16-bit color bitmap.

CreateHBitmapColorMask(Bitmap, IntPtr) CreateHBitmapColorMask(Bitmap, IntPtr) CreateHBitmapColorMask(Bitmap, IntPtr) CreateHBitmapColorMask(Bitmap, IntPtr)

在图像外创建 Win32 HBITMAPCreates a Win32 HBITMAP out of the image.

CreateHBitmapTransparencyMask(Bitmap) CreateHBitmapTransparencyMask(Bitmap) CreateHBitmapTransparencyMask(Bitmap) CreateHBitmapTransparencyMask(Bitmap)

为指定位图创建颜色掩码,指示哪种颜色应显示为透明。Creates a color mask for the specified bitmap that indicates which color should be displayed as transparent.

Dark(Color) Dark(Color) Dark(Color) Dark(Color)

按指定的颜色为控件创建一个新的深颜色对象。Creates a new dark color object for the control from the specified color.

Dark(Color, Single) Dark(Color, Single) Dark(Color, Single) Dark(Color, Single)

根据指定的颜色为控件创建一个新的深颜色对象并按照指定的百分比使其颜色变深。Creates a new dark color object for the control from the specified color and darkens it by the specified percentage.

DarkDark(Color) DarkDark(Color) DarkDark(Color) DarkDark(Color)

按指定的颜色为控件创建一个新的深颜色对象。Creates a new dark color object for the control from the specified color.

DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle) DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle) DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle) DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle)

在按钮样式控件上指定的边界内、指定的图形表面上绘制具有指定样式和颜色的边框。Draws a border with the specified style and color, on the specified graphics surface, and within the specified bounds on a button-style control.

DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle) DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle) DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle) DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle)

在按钮样式控件上指定的边界内、指定的图形表面上绘制具有指定的样式、颜色和边框宽度的边框。Draws a border on a button-style control with the specified styles, colors, and border widths; on the specified graphics surface; and within the specified bounds.

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32)

在控件上指定的边界内、指定的图形表面上绘制三维样式边框。Draws a three-dimensional style border on the specified graphics surface and within the specified bounds on a control.

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle)

在控件上指定的边界内、指定的图形表面上绘制具有指定样式的三维样式边框。Draws a three-dimensional style border with the specified style, on the specified graphics surface, and within the specified bounds on a control.

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide) DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide)

在控件上指定的边界内、指定的图形表面和边上绘制具有指定样式的三维样式边框。Draws a three-dimensional style border with the specified style, on the specified graphics surface and side, and within the specified bounds on a control.

DrawBorder3D(Graphics, Rectangle) DrawBorder3D(Graphics, Rectangle) DrawBorder3D(Graphics, Rectangle) DrawBorder3D(Graphics, Rectangle)

在控件上指定的边界内、指定的图形表面上绘制三维样式边框。Draws a three-dimensional style border on the specified graphics surface and within the specified bounds on a control.

DrawBorder3D(Graphics, Rectangle, Border3DStyle) DrawBorder3D(Graphics, Rectangle, Border3DStyle) DrawBorder3D(Graphics, Rectangle, Border3DStyle) DrawBorder3D(Graphics, Rectangle, Border3DStyle)

在控件上指定的边界内、指定的图形表面上绘制具有指定样式的三维样式边框。Draws a three-dimensional style border with the specified style, on the specified graphics surface, and within the specified bounds on a control.

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide) DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide) DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide) DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

在控件上指定的边界内、指定的图形表面和边上绘制具有指定样式的三维样式边框。Draws a three-dimensional style border with the specified style, on the specified graphics surface and sides, and within the specified bounds on a control.

DrawButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawButton(Graphics, Int32, Int32, Int32, Int32, ButtonState)

在指定的边界内、指定的图形表面上,绘制处于指定状态的按钮控件。Draws a button control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawButton(Graphics, Rectangle, ButtonState) DrawButton(Graphics, Rectangle, ButtonState) DrawButton(Graphics, Rectangle, ButtonState) DrawButton(Graphics, Rectangle, ButtonState)

在指定的边界内、指定的图形表面上,绘制处于指定状态的按钮控件。Draws a button control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawCaptionButton(Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState) DrawCaptionButton(Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState) DrawCaptionButton(Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState) DrawCaptionButton(Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState)

在指定的边界内、指定的图形表面上,绘制处于指定状态的指定标题按钮控件。Draws the specified caption button control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawCaptionButton(Graphics, Rectangle, CaptionButton, ButtonState) DrawCaptionButton(Graphics, Rectangle, CaptionButton, ButtonState) DrawCaptionButton(Graphics, Rectangle, CaptionButton, ButtonState) DrawCaptionButton(Graphics, Rectangle, CaptionButton, ButtonState)

在指定的边界内、指定的图形表面上,绘制处于指定状态的指定标题按钮控件。Draws the specified caption button control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState)

在指定边界内、指定的图形表面上,绘制处于指定状态的复选框控件。Draws a check box control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawCheckBox(Graphics, Rectangle, ButtonState) DrawCheckBox(Graphics, Rectangle, ButtonState) DrawCheckBox(Graphics, Rectangle, ButtonState) DrawCheckBox(Graphics, Rectangle, ButtonState)

在指定边界内、指定的图形表面上,绘制处于指定状态的复选框控件。Draws a check box control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawComboButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawComboButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawComboButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawComboButton(Graphics, Int32, Int32, Int32, Int32, ButtonState)

在组合框控件上绘制位于指定边界内、在指定的图形表面上、处于指定状态的下拉按钮。Draws a drop-down button on a combo box control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawComboButton(Graphics, Rectangle, ButtonState) DrawComboButton(Graphics, Rectangle, ButtonState) DrawComboButton(Graphics, Rectangle, ButtonState) DrawComboButton(Graphics, Rectangle, ButtonState)

在组合框控件上绘制位于指定边界内、在指定的图形表面上、处于指定状态的下拉按钮。Draws a drop-down button on a combo box control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawContainerGrabHandle(Graphics, Rectangle) DrawContainerGrabHandle(Graphics, Rectangle) DrawContainerGrabHandle(Graphics, Rectangle) DrawContainerGrabHandle(Graphics, Rectangle)

在指定的边界内、指定的图形表面上绘制容器控件抓取柄标志符号。Draws a container control grab handle glyph on the specified graphics surface and within the specified bounds.

DrawFocusRectangle(Graphics, Rectangle) DrawFocusRectangle(Graphics, Rectangle) DrawFocusRectangle(Graphics, Rectangle) DrawFocusRectangle(Graphics, Rectangle)

在指定边界内、指定的图形表面上绘制聚焦框。Draws a focus rectangle on the specified graphics surface and within the specified bounds.

DrawFocusRectangle(Graphics, Rectangle, Color, Color) DrawFocusRectangle(Graphics, Rectangle, Color, Color) DrawFocusRectangle(Graphics, Rectangle, Color, Color) DrawFocusRectangle(Graphics, Rectangle, Color, Color)

在指定边界内、指定的图形表面上绘制聚焦框。Draws a focus rectangle on the specified graphics surface and within the specified bounds.

DrawGrabHandle(Graphics, Rectangle, Boolean, Boolean) DrawGrabHandle(Graphics, Rectangle, Boolean, Boolean) DrawGrabHandle(Graphics, Rectangle, Boolean, Boolean) DrawGrabHandle(Graphics, Rectangle, Boolean, Boolean)

在指定的边界内、指定的图形表面上,按样式绘制处于指定状态的标准的选择抓取柄标志符号。Draws a standard selection grab handle glyph on the specified graphics surface, within the specified bounds, and in the specified state and style.

DrawGrid(Graphics, Rectangle, Size, Color) DrawGrid(Graphics, Rectangle, Size, Color) DrawGrid(Graphics, Rectangle, Size, Color) DrawGrid(Graphics, Rectangle, Size, Color)

在指定的边界内、指定的图形表面上,按指定颜色绘制由点(大小为一个像素,互相之间具有指定的间距)组成的网格。Draws a grid of one-pixel dots with the specified spacing, within the specified bounds, on the specified graphics surface, and in the specified color.

DrawImageDisabled(Graphics, Image, Int32, Int32, Color) DrawImageDisabled(Graphics, Image, Int32, Int32, Color) DrawImageDisabled(Graphics, Image, Int32, Int32, Color) DrawImageDisabled(Graphics, Image, Int32, Int32, Color)

绘制处于禁用状态的指定图像。Draws the specified image in a disabled state.

DrawLockedFrame(Graphics, Rectangle, Boolean) DrawLockedFrame(Graphics, Rectangle, Boolean) DrawLockedFrame(Graphics, Rectangle, Boolean) DrawLockedFrame(Graphics, Rectangle, Boolean)

在屏幕上指定的边界内、指定的图形表面上,绘制锁定的选择框。Draws a locked selection frame on the screen within the specified bounds and on the specified graphics surface. 指定是否使用主选择方案的颜色来绘制框架。Specifies whether to draw the frame with the primary selected colors.

DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph) DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph) DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph) DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph)

在菜单项控件上指定的边界内、指定的表面上,绘制指定的菜单标志符号。Draws the specified menu glyph on a menu item control with the specified bounds and on the specified surface.

DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph, Color, Color) DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph, Color, Color) DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph, Color, Color) DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph, Color, Color)

在菜单项控件上指定的图面上,以指定的坐标、高度和宽度绘制指定的菜单标志符号,用 backColor 参数中指定的颜色替换 White,并用 foreColor 参数中指定的颜色替换 BlackDraws the specified menu glyph on a menu item control within the specified coordinates, height, and width on the specified surface, replacing White with the color specified in the backColor parameter and replacing Black with the color specified in the foreColor parameter.

DrawMenuGlyph(Graphics, Rectangle, MenuGlyph) DrawMenuGlyph(Graphics, Rectangle, MenuGlyph) DrawMenuGlyph(Graphics, Rectangle, MenuGlyph) DrawMenuGlyph(Graphics, Rectangle, MenuGlyph)

在菜单项控件上指定的边界内、指定的表面上,绘制指定的菜单标志符号。Draws the specified menu glyph on a menu item control within the specified bounds and on the specified surface.

DrawMenuGlyph(Graphics, Rectangle, MenuGlyph, Color, Color) DrawMenuGlyph(Graphics, Rectangle, MenuGlyph, Color, Color) DrawMenuGlyph(Graphics, Rectangle, MenuGlyph, Color, Color) DrawMenuGlyph(Graphics, Rectangle, MenuGlyph, Color, Color)

在菜单项控件上指定的边界内、指定的图面上绘制指定的菜单标志符号,用 backColor 参数中指定的颜色替换 White,并用 foreColor 参数中指定的颜色替换 BlackDraws the specified menu glyph on a menu item control within the specified bounds and on the specified surface, replacing White with the color specified in the backColor parameter and replacing Black with the color specified in the foreColor parameter.

DrawMixedCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawMixedCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawMixedCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawMixedCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState)

在指定边界内、指定的图形表面上,绘制处于指定状态的三态复选框控件。Draws a three-state check box control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawMixedCheckBox(Graphics, Rectangle, ButtonState) DrawMixedCheckBox(Graphics, Rectangle, ButtonState) DrawMixedCheckBox(Graphics, Rectangle, ButtonState) DrawMixedCheckBox(Graphics, Rectangle, ButtonState)

在指定边界内、指定的图形表面上,绘制处于指定状态的三态复选框控件。Draws a three-state check box control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawRadioButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawRadioButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawRadioButton(Graphics, Int32, Int32, Int32, Int32, ButtonState) DrawRadioButton(Graphics, Int32, Int32, Int32, Int32, ButtonState)

在指定边界内、指定的图形表面上,绘制处于指定状态的单选按钮控件。Draws a radio button control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawRadioButton(Graphics, Rectangle, ButtonState) DrawRadioButton(Graphics, Rectangle, ButtonState) DrawRadioButton(Graphics, Rectangle, ButtonState) DrawRadioButton(Graphics, Rectangle, ButtonState)

在指定边界内、指定的图形表面上,绘制处于指定状态的单选按钮控件。Draws a radio button control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawReversibleFrame(Rectangle, Color, FrameStyle) DrawReversibleFrame(Rectangle, Color, FrameStyle) DrawReversibleFrame(Rectangle, Color, FrameStyle) DrawReversibleFrame(Rectangle, Color, FrameStyle)

在屏幕上的指定边界内,按指定背景色绘制处于指定状态的可逆框架。Draws a reversible frame on the screen within the specified bounds, with the specified background color, and in the specified state.

DrawReversibleLine(Point, Point, Color) DrawReversibleLine(Point, Point, Color) DrawReversibleLine(Point, Point, Color) DrawReversibleLine(Point, Point, Color)

在屏幕上指定的起始点和结束点内绘制具有指定背景色的可逆线。Draws a reversible line on the screen within the specified starting and ending points and with the specified background color.

DrawScrollButton(Graphics, Int32, Int32, Int32, Int32, ScrollButton, ButtonState) DrawScrollButton(Graphics, Int32, Int32, Int32, Int32, ScrollButton, ButtonState) DrawScrollButton(Graphics, Int32, Int32, Int32, Int32, ScrollButton, ButtonState) DrawScrollButton(Graphics, Int32, Int32, Int32, Int32, ScrollButton, ButtonState)

在滚动条控件上绘制位于指定边界内、在指定的图形表面上、处于指定状态的指定滚动按钮。Draws the specified scroll button on a scroll bar control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawScrollButton(Graphics, Rectangle, ScrollButton, ButtonState) DrawScrollButton(Graphics, Rectangle, ScrollButton, ButtonState) DrawScrollButton(Graphics, Rectangle, ScrollButton, ButtonState) DrawScrollButton(Graphics, Rectangle, ScrollButton, ButtonState)

在滚动条控件上绘制位于指定边界内、在指定的图形表面上、处于指定状态的指定滚动按钮。Draws the specified scroll button on a scroll bar control in the specified state, on the specified graphics surface, and within the specified bounds.

DrawSelectionFrame(Graphics, Boolean, Rectangle, Rectangle, Color) DrawSelectionFrame(Graphics, Boolean, Rectangle, Rectangle, Color) DrawSelectionFrame(Graphics, Boolean, Rectangle, Rectangle, Color) DrawSelectionFrame(Graphics, Boolean, Rectangle, Rectangle, Color)

在指定的图形表面上,按指定的内部与外部尺寸和指定的背景色绘制处于指定状态的标准选择框架。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.

DrawSizeGrip(Graphics, Color, Int32, Int32, Int32, Int32) DrawSizeGrip(Graphics, Color, Int32, Int32, Int32, Int32) DrawSizeGrip(Graphics, Color, Int32, Int32, Int32, Int32) DrawSizeGrip(Graphics, Color, Int32, Int32, Int32, Int32)

在窗体上绘制位于指定的图形表面上、具有指定边界和背景色的大小手柄。Draws a size grip on a form with the specified bounds and background color and on the specified graphics surface.

DrawSizeGrip(Graphics, Color, Rectangle) DrawSizeGrip(Graphics, Color, Rectangle) DrawSizeGrip(Graphics, Color, Rectangle) DrawSizeGrip(Graphics, Color, Rectangle)

在窗体上绘制位于指定的图形表面上、具有指定边界和背景色的大小手柄。Draws a size grip on a form with the specified bounds and background color and on the specified graphics surface.

DrawStringDisabled(Graphics, String, Font, Color, RectangleF, StringFormat) DrawStringDisabled(Graphics, String, Font, Color, RectangleF, StringFormat) DrawStringDisabled(Graphics, String, Font, Color, RectangleF, StringFormat) DrawStringDisabled(Graphics, String, Font, Color, RectangleF, StringFormat)

在指定图形表面上的指定边界内,以指定的字体、颜色和格式绘制处于禁用状态的指定字符串。Draws the specified string in a disabled state on the specified graphics surface; within the specified bounds; and in the specified font, color, and format.

DrawStringDisabled(IDeviceContext, String, Font, Color, Rectangle, TextFormatFlags) DrawStringDisabled(IDeviceContext, String, Font, Color, Rectangle, TextFormatFlags) DrawStringDisabled(IDeviceContext, String, Font, Color, Rectangle, TextFormatFlags) DrawStringDisabled(IDeviceContext, String, Font, Color, Rectangle, TextFormatFlags)

使用基于 GDI 的专用 TextRenderer,在指定图形表面上的指定边界内,以指定的字体、颜色和格式绘制处于禁用状态的指定字符串。Draws the specified string in a disabled state on the specified graphics surface, within the specified bounds, and in the specified font, color, and format, using the specified GDI-based TextRenderer.

DrawVisualStyleBorder(Graphics, Rectangle) DrawVisualStyleBorder(Graphics, Rectangle) DrawVisualStyleBorder(Graphics, Rectangle) DrawVisualStyleBorder(Graphics, Rectangle)

按照适合禁用项的样式绘制边框。Draws a border in the style appropriate for disabled items.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
FillReversibleRectangle(Rectangle, Color) FillReversibleRectangle(Rectangle, Color) FillReversibleRectangle(Rectangle, Color) FillReversibleRectangle(Rectangle, Color)

在屏幕上绘制实心的可逆矩形。Draws a filled, reversible rectangle on the screen.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
Light(Color) Light(Color) Light(Color) Light(Color)

根据指定的颜色为控件创建一个新的浅颜色对象。Creates a new light color object for the control from the specified color.

Light(Color, Single) Light(Color, Single) Light(Color, Single) Light(Color, Single)

按指定颜色为控件创建一个新的浅颜色对象,并按指定的百分比将其变浅。Creates a new light color object for the control from the specified color and lightens it by the specified percentage.

LightLight(Color) LightLight(Color) LightLight(Color) LightLight(Color)

根据指定的颜色为控件创建一个新的浅颜色对象。Creates a new light color object for the control from the specified color.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于

另请参阅