再问一个啊
在窗体上放置一个标签控件、定时器、命令按钮,用户单击命令按钮后,自左向右标签控件
我明天就要交这个作业了
也查了好久就是没找到
帮帮我啊
[此贴子已经被作者于2006-10-16 12:52:40编辑过]
[CODE]Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 100
Label1.Left = -Label1.Width
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left + 100
If Label1.Left >= Me.Width Then
Label1.Left = -Label1.Width
End If
End Sub[/CODE]
[CODE]Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer1.Enabled = True
Command1.Caption = "停止"
Else
Timer1.Enabled = False
Command1.Caption = "开始"
End If
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 100
Label1.Left = -Label1.Width
Command1.Caption = "开始"
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left + 100
If Label1.Left >= Me.Width Then
Label1.Left = -Label1.Width
End If
End Sub[/CODE]