vb考试题,请高手帮我完成(2)

2024-12-29 18:56:49
推荐回答(2个)
回答1:

窗体加入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

回答2:

刚考完vb,这个对我来说太难,中国考试怎么竟出这种神经病题