【VB开源代码栏目提醒】:以下是网学会员为您推荐的VB开源代码-来回移动的棒球.frm,希望本篇文章对您学习有所帮助。
VERSION 5.00
Begin VB.Form Form1
BackColor = &H80000009&
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleMode = 0 'User
ScaleWidth = 4680
Begin VB.CommandButton Command2
Caption = "结束"
Height = 495
Left = 2520
TabIndex = 1
Top = 2520
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 495
Left = 840
TabIndex = 0
Top = 2520
Width = 1215
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 100
Left = 4080
Top = 2520
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 100
Left = 240
Top = 2520
End
Begin VB.Image Image1
Height = 1695
Left = 120
Picture = "来回移动的棒球.frx":0000
Stretch = -1 'True
Top = 360
Width = 1695
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Timer1_Timer()
Image1.Left = Image1.Left + 50
If Image1.Left >= 3000 Then
Timer1.Enabled = False
Timer2.Enabled = True
End If
End Sub
Private Sub Timer2_Timer()
Image1.Left = Image1.Left - 50
If Image1.Left <= 0 Then
Timer1.Enabled = True
Timer2.Enabled = False
End If
End Sub
上一篇:
权限管理.frm
下一篇:
秋天是疼痛的