2013-11-11
展开全部
'从右向左的代码如下:
'
'添加一个label1和timerPrivate Sub Form_Load()
Label1.Caption = "求学到渝工,事业必成功"
Label1.Left = Me.Width
Label2.Left = Me.Width
Label2.Top = Me.Height
Timer1.Interval = 100
End SubPrivate Sub Timer1_Timer()
If Label1.Left <= Me.Width Then Label1.Left = Label1.Left - 100
If Label1.Left <= -Label1.Width Then Label1.Left = Me.WidthIf Label2.Left <= Me.Width Then Label2.Left = Label2.Left - 100
If Label2.Left <= -Label2.Width Then Label2.Left = Me.WidthIf Label2.Top >= 80 Then
Label2.Top = Label2.Top - 80
Else
Label2.Left = Me.Width
Label2.Top = Me.Height
End IfIf Label2.Top <= 0 Then
Label2.Top = Me.Height
End If
End Sub
'
'添加一个label1和timerPrivate Sub Form_Load()
Label1.Caption = "求学到渝工,事业必成功"
Label1.Left = Me.Width
Label2.Left = Me.Width
Label2.Top = Me.Height
Timer1.Interval = 100
End SubPrivate Sub Timer1_Timer()
If Label1.Left <= Me.Width Then Label1.Left = Label1.Left - 100
If Label1.Left <= -Label1.Width Then Label1.Left = Me.WidthIf Label2.Left <= Me.Width Then Label2.Left = Label2.Left - 100
If Label2.Left <= -Label2.Width Then Label2.Left = Me.WidthIf Label2.Top >= 80 Then
Label2.Top = Label2.Top - 80
Else
Label2.Left = Me.Width
Label2.Top = Me.Height
End IfIf Label2.Top <= 0 Then
Label2.Top = Me.Height
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询