Dim flag As Integer
Private Sub Form_Load()
  flag = 0
End Sub
Private Sub Command1_Click()
  If Command1.Caption = "移动" Then
'    Timer1.Enabled = ?
    Command1.Caption = "暂停"
  Else
    Timer1.Enabled = False
    Command1.Caption = "移动"
  End If
End Sub
Private Sub Command2_Click()
  End
End Sub
Private Sub Timer1_Timer()
  Select Case flag
      Case Is = 0
'        Label1.Left = Label1.Left  ?  100
        If Label1.Left + Label1.Width > = Form1.Width Then flag = 1
      Case Is = 1
'        Label1.Left = Label1.Left  ?  100
        If Label1.Left < = 0 Then flag = 0
  End Select
End Sub

发布于 2022-05-11 10:12:36

登录后免费查看答案
关注者
0
被浏览
23
1 个回答
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看