📄 shot.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 5970
ClientLeft = 0
ClientTop = 0
ClientWidth = 9000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "shot.frx":0000
ScaleHeight = 324.236
ScaleMode = 0 'User
ScaleWidth = 548.781
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Timer Timer3
Enabled = 0 'False
Interval = 1000
Left = 6870
Top = 4875
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 20
Left = 7590
Top = 4875
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 20
Left = 8175
Top = 4890
End
Begin VB.Label Label8
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "本题要求"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 465
Left = 240
TabIndex = 8
Top = 5280
Width = 615
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "60"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 7320
TabIndex = 6
Top = 480
Width = 330
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H00C0FFFF&
BorderStyle = 1 'Fixed Single
Caption = "时间: 秒"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 6480
TabIndex = 7
Top = 480
Width = 1620
End
Begin VB.Label Label7
Alignment = 2 'Center
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H00C0FFFF&
BorderStyle = 1 'Fixed Single
Caption = "3分"
ForeColor = &H80000008&
Height = 210
Left = 1050
TabIndex = 5
Top = 4680
Width = 405
End
Begin VB.Label Label6
Alignment = 2 'Center
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "2分"
ForeColor = &H80000008&
Height = 210
Left = 540
TabIndex = 4
Top = 3780
Width = 420
End
Begin VB.Label Label5
Alignment = 2 'Center
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "5分"
ForeColor = &H80000008&
Height = 210
Left = 1170
TabIndex = 3
Top = 2430
Width = 420
End
Begin VB.Label Label4
Alignment = 2 'Center
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "4分"
ForeColor = &H80000008&
Height = 210
Left = 465
TabIndex = 2
Top = 1500
Width = 420
End
Begin VB.Label DF
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "000"
BeginProperty Font
Name = "楷体_GB2312"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 435
Left = 4710
TabIndex = 1
Top = 5265
Width = 720
End
Begin VB.Image Image1
Height = 1815
Left = 7052
Picture = "shot.frx":BA3B
Stretch = -1 'True
Top = 3093
Width = 1785
End
Begin VB.Image Image6
Height = 105
Left = 7380
Picture = "shot.frx":14C35
Stretch = -1 'True
Top = 3683
Visible = 0 'False
Width = 480
End
Begin VB.Image Image5
Height = 552
Left = 492
Picture = "shot.frx":14F85
Stretch = -1 'True
Top = 921
Width = 420
End
Begin VB.Image Image4
Height = 368
Left = 1148
Picture = "shot.frx":189C1
Stretch = -1 'True
Top = 2025
Width = 410
End
Begin VB.Image Image3
Height = 465
Left = 1035
Picture = "shot.frx":4DFEB
Stretch = -1 'True
Top = 4200
Width = 495
End
Begin VB.Image Image2
Height = 555
Left = 495
Picture = "shot.frx":518F9
Stretch = -1 'True
Top = 3180
Width = 570
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "退出"
BeginProperty Font
Name = "华文中宋"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0FFFF&
Height = 315
Left = 8025
TabIndex = 0
Top = 5445
Width = 570
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim UpDown, Shot, JF As Boolean
Dim DeFen, ShiJian As Integer
Private Sub Command1_Click()
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Timer3.Enabled = True: Timer2.Enabled = True: Timer1.Enabled = True
If Shot = False And KeyCode = 32 Then
Image6.Top = Image1.Top + 30
Image6.Left = Image1.Left + 32
Timer2.Enabled = True
Shot = True: JF = False
DF.Caption = DeFen
Image6.Visible = True
End If
End Sub
Private Sub Form_Load()
Label1.ForeColor = vbBlue: UpDown = True: Shot = False: DeFen = 0
ShiJian = 60
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = vbBlue
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = vbYellow
End Sub
Private Sub Label8_Click()
Form2.Show
Form1.Enabled = False
End Sub
Private Sub Timer1_Timer()
If Image1.Top > 0 And Image1.Top < 5 Or Image1.Top > 250 And Image1.Top < 260 Then UpDown = Not UpDown
If UpDown Then
Image1.Top = Image1.Top - 1
Else
Image1.Top = Image1.Top + 1
End If
End Sub
Private Sub Timer2_Timer()
If Image6.Left > -50 Then
Image6.Left = Image6.Left - 5
Else
Timer2.Enabled = False
Shot = False
Image6.Visible = False
End If
'磨菇
If JF = False Then
If Image6.Top > Image2.Top And Image6.Top < Image2.Top + Image2.Height Then
If Image6.Left < Image2.Left + Image2.Width Then
DeFen = DeFen + 2
DF.Caption = DeFen
JF = True
End If
End If
'西瓜
If Image6.Top > Image3.Top And Image6.Top < Image3.Top + Image3.Height Then
If Image6.Left < Image3.Left + Image3.Width Then
DeFen = DeFen + 3
DF.Caption = DeFen
JF = True
End If
End If
'萍果
If Image6.Top > Image4.Top And Image6.Top < Image4.Top + Image4.Height Then
If Image6.Left < Image4.Left + Image4.Width Then
DeFen = DeFen + 5
DF.Caption = DeFen
JF = True
End If
End If
'洋葱
If Image6.Top > Image5.Top And Image6.Top < Image5.Top + Image5.Height Then
If Image6.Left < Image5.Left + Image5.Width Then
DeFen = DeFen + 4
DF.Caption = DeFen
JF = True
End If
End If
End If
End Sub
Private Sub Timer3_Timer()
ShiJian = ShiJian - 1
Label2.Caption = ShiJian
If ShiJian = 0 Then
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
ShiJian = 60
DeFen = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -