在窗体中加入一个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
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/