VB6.0自动红绿灯设计及代码

时间:2022-07-13 23:17:12 阅读: 最新文章 文档下载
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。
VB6.0 自动红绿灯 无人红绿灯演示 设计代码






代码:

Private Sub Timer1_Timer() If Image1.Visible = True Then

If Image4.Left < Form1.Width Then Image4.Left = Image4.Left + 100 Else

Image4.Left = -Image4.Width End If End If

i = i + 1

Select Case i Case Is <= 160

Image1.Visible = True Image3.Visible = False Image2.Visible = False Case Is <= 330

Image2.Visible = True Image1.Visible = False Image3.Visible = False Case Is <= 460

Image1.Visible = False Image2.Visible = False Image3.Visible = True Case Is <= 500

Image3.Visible = True Case Else

i = 0 End Select

End Sub


本文来源:https://www.wddqw.com/doc/09ca6b5759eef8c75fbfb3f0.html