Private Sub Timer1_Timer() Static i As Integer With Label1 Select Case (i Mod 2) Case 0 If .FontSize > 2 Then .FontSize = .FontSize - 2 .Left = (Me.Width - .Width) / 2 .Top = (Me.Height - .Height) / 2 Else i = i + 1 End If Case 1 If .FontSize < 150 And (i Mod 2) = 1 Then .FontSize = .FontSize + 2 .Left = (Me.Width - .Width) / 2 .Top = (Me.Height - .Height) / 2 Else i = i + 1 End If End Select End With End Sub 这样就更好了
Private Sub Timer1_Timer()
Static i As Integer
With Label1
Select Case (i Mod 2)
Case 0
If .FontSize > 2 Then
.FontSize = .FontSize - 2
.Left = (Me.Width - .Width) / 2
.Top = (Me.Height - .Height) / 2
Else
i = i + 1
End If
Case 1
If .FontSize < 150 And (i Mod 2) = 1 Then
.FontSize = .FontSize + 2
.Left = (Me.Width - .Width) / 2
.Top = (Me.Height - .Height) / 2
Else
i = i + 1
End If
End Select
End With
End Sub
这样就更好了