Border3DStyle 枚举
指定三维边框的样式。
**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)
语法
声明
<ComVisibleAttribute(True)> _
Public Enumeration Border3DStyle
用法
Dim instance As Border3DStyle
[ComVisibleAttribute(true)]
public enum Border3DStyle
[ComVisibleAttribute(true)]
public enum class Border3DStyle
/** @attribute ComVisibleAttribute(true) */
public enum Border3DStyle
ComVisibleAttribute(true)
public enum Border3DStyle
成员
成员名称 | 说明 | |
---|---|---|
Adjust | 在指定矩形的外面绘制边框,保留矩形要进行绘制的维度。 | |
Bump | 该边框的内外边缘都具有凸起的外观。 | |
Etched | 该边框的内外边缘都具有蚀刻的外观。 | |
Flat | 该边框没有三维效果。 | |
Raised | 该边框具有凸起的内外边缘。 | |
RaisedInner | 该边框具有凸起的内边缘,无外边缘。 | |
RaisedOuter | 该边框具有凸起的外边缘,无内边缘。 | |
Sunken | 该边框具有凹下的内外边缘。 | |
SunkenInner | 该边框具有凹下的内边缘,无外边缘。 | |
SunkenOuter | 该边框具有凹下的外边缘,无内边缘。 |
备注
在调用 ControlPaint 类的 DrawBorder3D 方法时使用该枚举的成员。
示例
下面的代码示例演示了如何使用 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.
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
// 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.
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.get_ClientRectangle();
borderRectangle.Inflate(-10, -10);
ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle,
Border3DStyle.Raised);
} //Form1_Paint
平台
Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0