日期:2012-02-04  浏览次数:20533 次

Public Class Lebel3D
    Inherits System.Windows.Forms.UserControl  
#Region " Windows 窗体设计器生成的代码 "  
    Public Sub New()
        MyBase.New()  
        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()  
        '在 InitializeComponent() 调用之后添加任何初始化
        mCaption = "Label3D"
        mAlignment = Align.CenterMiddle
        mAutoSize = False
        mEffect = Effect3D.Raised
        setstyle(ControlStyles.ResizeRedraw, True)
    End Sub  
    'UserControl1 重写 dispose 以清理组件列表。
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub  
    'Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer
    '注意:以下过程是 Windows 窗体设计器所必需的
    '可以使用 Windows 窗体设计器修改此过程。
    '不要使用代码编辑器修改它。
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()        '
        Me.Name = "Label3D"  
    End Sub  
#End Region  
    Private Shared mAlignment As Align
    Private Shared mAutoSize As Boolean
    Private Shared mEffect As Effect3D
    Private mCaption As String  
    Public Property Alignment() As Align
        Get
            Return mAlignment
        End Get
        Set(ByVal Value As Align)
            mAlignment = Value
            Invalidate()
        End Set
    End Property  
    Public Property AutoSize() As Boolean
        Get
            Return mAutoSize
        End Get
        Set(ByVal Value As Boolean)
            mAutoSize = Value
            Invalidate()
        End Set
    End Property  
    Public Property Effect() As Effect3D
        Get
            Return mEffec