閱讀英文

共用方式為


Border3DStyle 列舉

定義

指定 3D 框線的樣式。

C#
[System.Runtime.InteropServices.ComVisible(true)]
public enum Border3DStyle
C#
public enum Border3DStyle
繼承
Border3DStyle
屬性

欄位

名稱 Description
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 與此範例中的事件處理方法相關聯。

C#
// 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);
}

備註

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

適用於

產品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9