Border3DStyle 列舉

定義

指定 3D 框線的樣式。

public enum class Border3DStyle
[System.Runtime.InteropServices.ComVisible(true)]
public enum Border3DStyle
public enum Border3DStyle
[<System.Runtime.InteropServices.ComVisible(true)>]
type Border3DStyle = 
type Border3DStyle = 
Public Enum Border3DStyle
繼承
Border3DStyle
屬性

欄位

Adjust 8192

框線描繪在指定矩形的外面,保留描繪之矩形的大小。

Bump 9

框線的內框和外框有浮起的外觀。

Etched 6

框線的內框和外框有蝕刻的外觀。

Flat 16394

框線沒有 3D 效果。

Raised 5

框線有浮起的內邊緣和外邊緣。

RaisedInner 4

框線有浮起的內邊緣,沒有外邊緣。

RaisedOuter 1

框線有浮起的外邊緣,沒有內邊緣。

Sunken 10

框線有下凹的內邊緣和外邊緣。

SunkenInner 8

框線有下凹的內邊緣,沒有外邊緣。

SunkenOuter 2

框線有下凹的外邊緣,沒有內邊緣。

範例

下列程式碼範例示範 如何使用 ControlPaint.DrawBorder3D 方法和 Border3DStyle 列舉。 若要執行此範例,請將下列程式碼貼到匯入 System.Windows.Forms 和 System.Drawing 命名空間的表單中。 請確定表單的事件 Paint 與此範例中的事件處理方法相關聯。

// Handle the Form's Paint event to draw a 3D three-dimensional 
// raised border just inside the border of the frame.
void Form1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   Rectangle borderRectangle = this->ClientRectangle;
   borderRectangle.Inflate(  -10, -10 );
   ControlPaint::DrawBorder3D( e->Graphics, borderRectangle, Border3DStyle::Raised );
}
// Handle the Form's Paint event to draw a 3D three-dimensional 
// raised border just inside the border of the frame.
private void Form1_Paint(object sender, PaintEventArgs e)
{

    Rectangle borderRectangle = this.ClientRectangle;
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.Graphics, borderRectangle, 
        Border3DStyle.Raised);
}
' Handle the Form's Paint event to draw a 3D three-dimensional 
' raised border just inside the border of the frame.
Private Sub Form1_Paint(ByVal sender As Object, _
    ByVal e As PaintEventArgs) Handles MyBase.Paint

    Dim borderRectangle As Rectangle = Me.ClientRectangle
    borderRectangle.Inflate(-10, -10)
    ControlPaint.DrawBorder3D(e.Graphics, borderRectangle, _
        Border3DStyle.Raised)
End Sub

備註

呼叫 類別的 ControlPaint 方法時 DrawBorder3D ,請使用這個列舉的成員。

適用於