⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmshoot.frm

📁 动画实现及应用的源程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmShoot 
   BackColor       =   &H00000000&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Shooter"
   ClientHeight    =   3300
   ClientLeft      =   3615
   ClientTop       =   3030
   ClientWidth     =   4500
   Icon            =   "frmShoot.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3300
   ScaleWidth      =   4500
   Begin VB.Timer Timer4 
      Enabled         =   0   'False
      Interval        =   10
      Left            =   3840
      Top             =   600
   End
   Begin VB.TextBox Text3 
      Height          =   285
      Left            =   3600
      TabIndex        =   2
      Text            =   "0"
      Top             =   2400
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.Timer Timer3 
      Enabled         =   0   'False
      Interval        =   250
      Left            =   3360
      Top             =   600
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   3600
      TabIndex        =   1
      Text            =   "0"
      Top             =   2760
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.Timer Timer2 
      Enabled         =   0   'False
      Interval        =   250
      Left            =   3840
      Top             =   120
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   6000
      TabIndex        =   0
      Text            =   "1"
      Top             =   3960
      Visible         =   0   'False
      Width           =   1695
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   50
      Left            =   3360
      Top             =   120
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "Click on the Gun to Fire"
      ForeColor       =   &H0000FF00&
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   2640
      Width           =   1215
   End
   Begin VB.Image Image16 
      Height          =   495
      Left            =   240
      Top             =   1440
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.Image Image14 
      Height          =   495
      Left            =   1800
      Top             =   480
      Width           =   975
   End
   Begin VB.Image Image15 
      Height          =   1305
      Left            =   1320
      Picture         =   "frmShoot.frx":030A
      Stretch         =   -1  'True
      Top             =   1440
      Visible         =   0   'False
      Width           =   1860
   End
   Begin VB.Image Image13 
      Height          =   960
      Left            =   4680
      Picture         =   "frmShoot.frx":2D98
      Top             =   3600
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image12 
      Height          =   960
      Left            =   6600
      Picture         =   "frmShoot.frx":5DDA
      Top             =   2640
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image11 
      Height          =   960
      Left            =   5640
      Picture         =   "frmShoot.frx":8E1C
      Top             =   2640
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image10 
      Height          =   960
      Left            =   4680
      Picture         =   "frmShoot.frx":BE5E
      Top             =   2520
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image9 
      Height          =   960
      Left            =   6600
      Picture         =   "frmShoot.frx":EEA0
      Top             =   1320
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image8 
      Height          =   960
      Left            =   5640
      Picture         =   "frmShoot.frx":11EE2
      Top             =   1320
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image7 
      Height          =   960
      Left            =   4680
      Picture         =   "frmShoot.frx":14F24
      Top             =   1200
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image6 
      Height          =   960
      Left            =   6960
      Picture         =   "frmShoot.frx":17F66
      Top             =   240
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image5 
      Height          =   960
      Left            =   6120
      Picture         =   "frmShoot.frx":1AFA8
      Top             =   240
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image4 
      Height          =   960
      Left            =   5400
      Picture         =   "frmShoot.frx":1DFEA
      Top             =   240
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image3 
      Height          =   960
      Left            =   4680
      Picture         =   "frmShoot.frx":2102C
      Top             =   240
      Visible         =   0   'False
      Width           =   960
   End
   Begin VB.Image Image2 
      Height          =   480
      Left            =   2040
      Picture         =   "frmShoot.frx":2406E
      Stretch         =   -1  'True
      Top             =   840
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   1125
      Left            =   1440
      Picture         =   "frmShoot.frx":24378
      Top             =   2160
      Width           =   1560
   End
End
Attribute VB_Name = "frmShoot"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''Shooter Game Animation/Sound Demonstration'''''
''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''Copyright Ben Simpson Design 2000'''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''ben.simpson@btinternet.com'''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''http://www.btinternet.com/~Simps.Family''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''' Click On The Gun To Fire''''''''''''''
Private Sub Form_Load()
Image2.Top = 1800
End Sub

Private Sub Image1_Click()
Timer2.Enabled = True
Image14.Visible = True
Image15.Visible = True
End Sub

Private Sub Timer1_Timer()
'Show and animate the explosion
Text1.Text = Text1.Text + 1
Select Case Text1.Text
    Case 2
    Image14.Picture = Image3.Picture
    Case 3
    Image14.Picture = Image4.Picture
    Case 4
    Image14.Picture = Image5.Picture
    Case 5
    Image14.Picture = Image6.Picture
    Case 6
    Image14.Picture = Image7.Picture
    Case 7
    Image14.Picture = Image8.Picture
    Case 8
    Image14.Picture = Image9.Picture
    Case 9
    Image14.Picture = Image10.Picture
    Case 10
    Image14.Picture = Image11.Picture
    Case 11
    Image14.Picture = Image12.Picture
    Case 12
    Image14.Picture = Image13.Picture
    Case 13
    Text1.Text = 1
    Timer1.Enabled = False
    Timer2.Enabled = False
    Timer3.Enabled = False
    Image14.Visible = False
    Image14.Picture = Image16.Picture
End Select
End Sub

Private Sub Timer2_Timer()
Text2.Text = Text2.Text + 1
If Text2.Text = "2" Then
Timer1.Enabled = False
Image2.Visible = True
Timer4.Enabled = True
Timer3.Enabled = True
Timer2.Enabled = False
Text2.Text = "0"
Image15.Visible = False
End If
End Sub

Private Sub Timer3_Timer()
Text3.Text = Text3.Text + 1
If Text3.Text = "1" Then
Timer1.Enabled = True
Text3.Text = "0"
End If
End Sub

Private Sub Timer4_Timer()
'make the rocket fly
Image2.Top = Image2.Top - 150
If Image2.Top <= 840 Then
Timer4.Enabled = False
Image2.Visible = False
'play the explosion sound (see the WebS Module, WebS.bas)
j = sndPlaySound(App.Path & "\Explode.wav", SND_ASYNC)
Image2.Top = 1800
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -