窗体加入command1,command2,label1,timer1等控件。
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Command1.Caption = "开始"
Command2.Caption = "停止"
Label1.Caption = "欢迎光临"
Timer1.Interval = 100
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left - 100
If Label1.Left + Label1.Width < 0 Then
Label1.Left = Me.ScaleWidth
End If
End Sub
刚考完vb,这个对我来说太难,中国考试怎么竟出这种神经病题