在窗體中加入一個Timer(定時器),標簽(Label)
Private Sub Form_Load()
With Me
.BackColor = vbBlack
.WindowState = vbMaximized
End With
With Label1
.Alignment = vbCenter
.AutoSize = True
.BackColor = vbBlack
.Caption = "歪歪的VB教程"
.Font.Name = "宋體"
.Font.Size = 150
.ForeColor = vbGreen
.Visible = True
End With
With Timer1
.Interval = 1
.Enabled = True
End With
End Sub
Private Sub Timer1_Timer()
With Label1
If .FontSize $#@62; 2 Then
.FontSize = .FontSize - 2
.Left = (Me.Width - .Width) / 2
.Top = (Me.Height - .Height) / 2
Else
.Visible = False
Timer1.Enabled = False
End If
End With
End Sub
延伸閱讀
文章來源于領測軟件測試網 http://www.kjueaiud.com/