⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crtborn.vb

📁 请大家,多多指点,有空联系,谈谈.这是一个用不着Visual Basic写的.
💻 VB
字号:
Public Class crtBorn
    Inherits System.Windows.Forms.UserControl

#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        '在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    'UserControl 重写 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 窗体设计器修改此过程。
    '不要使用代码编辑器修改它。
    Friend WithEvents lblYear As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.lblYear = New System.Windows.Forms.Label
        Me.SuspendLayout()
        '
        'lblYear
        '
        Me.lblYear.Dock = System.Windows.Forms.DockStyle.Fill
        Me.lblYear.Location = New System.Drawing.Point(0, 0)
        Me.lblYear.Name = "lblYear"
        Me.lblYear.Size = New System.Drawing.Size(150, 150)
        Me.lblYear.TabIndex = 0
        Me.lblYear.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'crtBorn
        '
        Me.Controls.Add(Me.lblYear)
        Me.Name = "crtBorn"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private _Birthday As DateTime

    Public Property Birthday() As DateTime
        Get
            Birthday = _Birthday
        End Get
        Set(ByVal Value As DateTime)
            _Birthday = Value
            BirthdayProcess()
        End Set
    End Property

    Private Sub BirthdayProcess()
        If _Birthday.IsLeapYear(_Birthday.Year) = True Then
            lblYear.Text = "你出生的那年是闰年"
        Else
            lblYear.Text = "你出生的那年是平年"
        End If
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -