2009年2月23日 星期一

簡易版數字變化效果

image

'簡易版數字變化效果
Public Class Form1
    Dim i
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Interval = 500
        Timer1.Enabled = True
        i = 0

        '格式設定
        With Label1
            .BackColor = Color.Blue
            .ForeColor = Color.Yellow
            .Font = New Font("Arial Black", 60)
            .AutoSize = True
        End With
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = i
        i = i + 1
    End Sub
End Class

沒有留言:

張貼留言