5个回答
展开全部
image1.left=image1.left+20,image1是放图片的图像框name
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim x As Long, y As Long
Private Sub Form_Load()
x = Me.ScaleWidth
y = Me.ScaleWidth + Picture1.Width + 1200
Timer1.Interval = 200
End Sub
Private Sub Timer1_Timer()
x = x - 200
y = y - 200
If x <= 0 - Picture1.Width Then x = Me.ScaleWidth
If y <= 0 - Picture1.Width Then y = Me.ScaleWidth
Picture1.Move x, Me.ScaleHeight / 2, Me.ScaleWidth / 8, Me.ScaleHeight / 8
Picture2.Move y, Me.ScaleHeight / 2, Me.ScaleWidth / 8, Me.ScaleHeight / 8
End Sub
Private Sub Form_Load()
x = Me.ScaleWidth
y = Me.ScaleWidth + Picture1.Width + 1200
Timer1.Interval = 200
End Sub
Private Sub Timer1_Timer()
x = x - 200
y = y - 200
If x <= 0 - Picture1.Width Then x = Me.ScaleWidth
If y <= 0 - Picture1.Width Then y = Me.ScaleWidth
Picture1.Move x, Me.ScaleHeight / 2, Me.ScaleWidth / 8, Me.ScaleHeight / 8
Picture2.Move y, Me.ScaleHeight / 2, Me.ScaleWidth / 8, Me.ScaleHeight / 8
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
picture1.Left = picture1.Left - 10
If picture1.Left + picture1.Width <= 0 Then picture1.Left = Me.Width
End Sub
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
picture1.Left = picture1.Left - 10
If picture1.Left + picture1.Width <= 0 Then picture1.Left = Me.Width
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询