ControlPaint.DrawCaptionButton Yöntem

Tanım

Resim yazısı düğmesi denetimi çizer.

Aşırı Yüklemeler

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

Belirtilen resim yazısı düğme denetimini belirtilen durumda, belirtilen grafik yüzeyinde ve belirtilen sınırların içinde çizer.

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

Belirtilen resim yazısı düğme denetimini belirtilen durumda, belirtilen grafik yüzeyinde ve belirtilen sınırların içinde çizer.

DrawCaptionButton(Graphics, Rectangle, CaptionButton, ButtonState)

Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs

Belirtilen resim yazısı düğme denetimini belirtilen durumda, belirtilen grafik yüzeyinde ve belirtilen sınırların içinde çizer.

public:
 static void DrawCaptionButton(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle rectangle, System::Windows::Forms::CaptionButton button, System::Windows::Forms::ButtonState state);
public static void DrawCaptionButton(System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, System.Windows.Forms.CaptionButton button, System.Windows.Forms.ButtonState state);
static member DrawCaptionButton : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.CaptionButton * System.Windows.Forms.ButtonState -> unit
Public Shared Sub DrawCaptionButton (graphics As Graphics, rectangle As Rectangle, button As CaptionButton, state As ButtonState)

Parametreler

graphics
Graphics

Çizecek Graphics olan.

rectangle
Rectangle

Resim Rectangle yazısı düğmesinin boyutlarını temsil eden.

button
CaptionButton

CaptionButton Çizecek resim yazısı düğmesinin türünü belirten değerlerden biri.

state
ButtonState

Düğmenin ButtonState çizildiğini belirten değerlerin bit düzeyinde birleşimi.

Örnekler

Aşağıdaki kod örneği, yönteminin ControlPaint.DrawCaptionButton ve numaralandırmasının CaptionButton kullanımını gösterir. Bu örneği çalıştırmak için aşağıdaki kodu adlı Button1düğmeyi içeren bir forma yapıştırın. Form, System.Windows.Forms ve System.Drawing ad alanlarını içeri aktarmalıdır. Düğmenin Paint olayının bu örnekteki olay işleyicisiyle ilişkilendirildiğinden emin olun.

// Handle the Button1 object's Paint Event to create a CaptionButton.
void Button1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   
   // Draw a CaptionButton control using the ClientRectangle 
   // property of Button1. Make the button a Help button 
   // with a normal state.
   ControlPaint::DrawCaptionButton( e->Graphics, Button1->ClientRectangle, CaptionButton::Help, ButtonState::Normal );
}
// Handle the Button1 object's Paint Event to create a CaptionButton.
private void Button1_Paint(object sender, PaintEventArgs e)
{

    // Draw a CaptionButton control using the ClientRectangle 
    // property of Button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle,
        CaptionButton.Help, ButtonState.Normal);
}
' Handle the Button1 object's Paint Event to create a CaptionButton.
Private Sub Button1_Paint(ByVal sender As Object, _
    ByVal e As PaintEventArgs) Handles Button1.Paint

    ' Draw a CaptionButton control using the ClientRectangle 
    ' property of Button1. Make the button a Help button 
    ' with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle, _
        CaptionButton.Help, ButtonState.Normal)
End Sub

Ayrıca bkz.

Şunlara uygulanır

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

Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs

Belirtilen resim yazısı düğme denetimini belirtilen durumda, belirtilen grafik yüzeyinde ve belirtilen sınırların içinde çizer.

public:
 static void DrawCaptionButton(System::Drawing::Graphics ^ graphics, int x, int y, int width, int height, System::Windows::Forms::CaptionButton button, System::Windows::Forms::ButtonState state);
public static void DrawCaptionButton(System.Drawing.Graphics graphics, int x, int y, int width, int height, System.Windows.Forms.CaptionButton button, System.Windows.Forms.ButtonState state);
static member DrawCaptionButton : System.Drawing.Graphics * int * int * int * int * System.Windows.Forms.CaptionButton * System.Windows.Forms.ButtonState -> unit
Public Shared Sub DrawCaptionButton (graphics As Graphics, x As Integer, y As Integer, width As Integer, height As Integer, button As CaptionButton, state As ButtonState)

Parametreler

graphics
Graphics

Çizecek Graphics olan.

x
Int32

Çizim dikdörtgeninin sol üst köşesindeki x koordinatı.

y
Int32

Çizim dikdörtgeninin sol üst köşesindeki y koordinatı.

width
Int32

Çizim dikdörtgeninin genişliği.

height
Int32

Çizim dikdörtgeninin yüksekliği.

button
CaptionButton

CaptionButton Çizecek resim yazısı düğmesinin türünü belirten değerlerden biri.

state
ButtonState

Düğmenin ButtonState çizildiğini belirten değerlerin bit düzeyinde birleşimi.

Örnekler

Aşağıdaki kod örneği, yönteminin DrawCaptionButton ve numaralandırmasının CaptionButton kullanımını gösterir. Bu örneği çalıştırmak için aşağıdaki kodu adlı Buttonbir forma Button1 yapıştırın. Form, System.Windows.Forms ve System.Drawing ad alanlarını içeri aktarmalıdır. Düğmenin Paint olayının bu örnekteki olay işleyicisiyle ilişkilendirildiğinden emin olun.

// Handle the Button1 object's Paint Event to create a CaptionButton.
void Button1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   
   // Draw a CaptionButton control using the ClientRectangle 
   // property of Button1. Make the button a Help button 
   // with a normal state.
   ControlPaint::DrawCaptionButton( e->Graphics, Button1->ClientRectangle, CaptionButton::Help, ButtonState::Normal );
}
// Handle the Button1 object's Paint Event to create a CaptionButton.
private void Button1_Paint(object sender, PaintEventArgs e)
{

    // Draw a CaptionButton control using the ClientRectangle 
    // property of Button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle,
        CaptionButton.Help, ButtonState.Normal);
}
' Handle the Button1 object's Paint Event to create a CaptionButton.
Private Sub Button1_Paint(ByVal sender As Object, _
    ByVal e As PaintEventArgs) Handles Button1.Paint

    ' Draw a CaptionButton control using the ClientRectangle 
    ' property of Button1. Make the button a Help button 
    ' with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle, _
        CaptionButton.Help, ButtonState.Normal)
End Sub

Ayrıca bkz.

Şunlara uygulanır