VB 设计一个蝴蝶在窗体内自动飞舞的的程序。(提示:使用Timer和图像框控件) 5
1个回答
展开全部
Private Sub Timer3_Timer()
Image3.Move Image3.Left + 20, Image3.Top - 6
If Image1.Top <= 0 Then
Image1.Left = 140
Image1.Top = 480
End If
If Image3.Picture = Image1.Picture Then
Image3.Picture = Image1.Picture
Image3.Picture = Image2.Picture
Else
Image3.Picture = Image2.Picture
Image3.Picture = Image1.Picture
End If
End Sub
Image3.Move Image3.Left + 20, Image3.Top - 6
If Image1.Top <= 0 Then
Image1.Left = 140
Image1.Top = 480
End If
If Image3.Picture = Image1.Picture Then
Image3.Picture = Image1.Picture
Image3.Picture = Image2.Picture
Else
Image3.Picture = Image2.Picture
Image3.Picture = Image1.Picture
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询