文件名称:cod1
介绍说明--下载内容均来自于网络,请自行研究使用
在FORM1在增加1个Label1标签,2个TIMER对象,分别为Timer1、Timer2代码如下:
Private Sub Form_Load()
Timer1.Interval = 100
Timer2.Interval = 100
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left + 50
If Label1.Left + Label1.Width >= Form1.Width Then
Timer2.Enabled = True
Timer1.Enabled = False
End If
End Sub
Private Sub Timer2_Timer()
Label1.Left = Label1.Left - 50
If Label1.Left <= 0 Then
Timer1.Enabled = True
Timer2.Enabled = False
End If
End Sub
-The increase in FORM1 Label1 label 1, 2 TIMER object, respectively, Timer1, Timer2 code is as follows: Private Sub Form_Load () Timer1.Interval = 100 Timer2.Interval = 100 Timer1.Enabled = True Timer2.Enabled = False End Sub Private Sub Timer1_Timer () Label1.Left = Label1.Left+ 50 If Label1.Left+ Label1.Width> = Form1.Width Then Timer2.Enabled = True Timer1.Enabled = False End If End Sub Private Sub Timer2_Timer () Label1.Left = Label1.Left- 50 If Label1.Left < = 0 Then Timer1.Enabled = True Timer2.Enabled = False End If End Sub
Private Sub Form_Load()
Timer1.Interval = 100
Timer2.Interval = 100
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left + 50
If Label1.Left + Label1.Width >= Form1.Width Then
Timer2.Enabled = True
Timer1.Enabled = False
End If
End Sub
Private Sub Timer2_Timer()
Label1.Left = Label1.Left - 50
If Label1.Left <= 0 Then
Timer1.Enabled = True
Timer2.Enabled = False
End If
End Sub
-The increase in FORM1 Label1 label 1, 2 TIMER object, respectively, Timer1, Timer2 code is as follows: Private Sub Form_Load () Timer1.Interval = 100 Timer2.Interval = 100 Timer1.Enabled = True Timer2.Enabled = False End Sub Private Sub Timer1_Timer () Label1.Left = Label1.Left+ 50 If Label1.Left+ Label1.Width> = Form1.Width Then Timer2.Enabled = True Timer1.Enabled = False End If End Sub Private Sub Timer2_Timer () Label1.Left = Label1.Left- 50 If Label1.Left < = 0 Then Timer1.Enabled = True Timer2.Enabled = False End If End Sub
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cod1.txt
VB代码.doc
VB代码.doc