怎么不能如其所愿呢?
Private Sub Command1_Click()
If Command1.Caption = "&S开始" Then
Command1.Caption = "&E暂停"
Timer1.Enabled = True
Timer2.Enabled = True
ElseIf Command1.Caption = "&E暂停" Then
Command1.Caption = "&S开始"
Timer1.Enabled = False
Timer2.Enabled = False
End If
Timer1.Interval = 1
Timer2.Interval = 1
End Sub
Private Sub Form_Load()
Me.Caption = "滚动字幕板"
Label1.Left = Form1.Width - Label1.Width
Label1.Top = (Me.ScaleHeight - Label1.Height) / 2
End Sub
Private Sub Text1_Change()
Label1.Caption = Text1.Text
Label3.Caption = Text1.Text
End Sub
Private Sub Timer1_Timer()
If Label1.Left > 0 Then
Label1.Move Label1.Left - 10
Else
Timer1.Enabled = False
Timer2.Enabled = False
End If
End Sub
Private Sub Timer2_Timer()
If Label3.Left < Form1.Width Then
Label3.Left = Label3.Left + 30
Else
Label3.Left = 0 - Label3.Width
End If
If Label1.Top = Label3.Top - Label3.Width Then Label2.Caption = Label2.Caption + 1 '怎么不能如其所愿呢?
End Sub