📄 form1.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1
BackColor = &H80000009&
Caption = "Form1"
ClientHeight = 8850
ClientLeft = 60
ClientTop = 450
ClientWidth = 10395
LinkTopic = "Form1"
MouseIcon = "Form1.frx":0000
ScaleHeight = 8850
ScaleWidth = 10395
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "下一条"
Height = 375
Left = 4320
TabIndex = 12
Top = 7080
Width = 855
End
Begin VB.Timer Timer17
Left = 4560
Top = 0
End
Begin VB.PictureBox Picture3
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 615
Left = 3480
ScaleHeight = 615
ScaleWidth = 615
TabIndex = 10
Top = 960
Width = 615
End
Begin VB.Timer Timer16
Left = 0
Top = 0
End
Begin VB.Timer Timer15
Left = 9960
Top = 0
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 615
Left = 600
ScaleHeight = 615
ScaleWidth = 615
TabIndex = 0
Top = 3360
Width = 615
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 135
Left = 1560
TabIndex = 6
Top = 8160
Width = 3375
_ExtentX = 5953
_ExtentY = 238
_Version = 393216
Appearance = 0
End
Begin VB.Frame Frame2
BackColor = &H80000009&
Caption = "敌人信息"
Height = 975
Left = 5160
TabIndex = 3
Top = 7440
Width = 3735
Begin MSComctlLib.ProgressBar ProgressBar2
Height = 135
Left = 120
TabIndex = 9
Top = 720
Width = 3495
_ExtentX = 6165
_ExtentY = 238
_Version = 393216
Appearance = 0
End
Begin VB.Label Label4
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "2"
ForeColor = &H80000008&
Height = 255
Left = 360
TabIndex = 8
Top = 360
Width = 3015
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Hp:"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 7
Top = 360
Width = 255
End
End
Begin VB.Frame Frame1
BackColor = &H80000009&
Caption = "人物信息"
Height = 975
Left = 1440
TabIndex = 2
Top = 7440
Width = 3615
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "1"
ForeColor = &H80000008&
Height = 255
Left = 360
TabIndex = 5
Top = 360
Width = 3015
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Hp:"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 4
Top = 360
Width = 255
End
End
Begin VB.Timer Timer9
Left = 960
Top = 8400
End
Begin VB.Timer Timer8
Left = 0
Top = 8400
End
Begin VB.Timer Timer7
Left = 960
Top = 7440
End
Begin VB.Timer Timer6
Left = 0
Top = 7440
End
Begin VB.Timer Timer5
Left = 480
Top = 7920
End
Begin VB.Timer Timer4
Left = 960
Top = 7920
End
Begin VB.Timer Timer3
Left = 0
Top = 7920
End
Begin VB.Timer Timer2
Left = 480
Top = 8400
End
Begin VB.PictureBox Picture2
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 615
Left = 8880
ScaleHeight = 615
ScaleWidth = 615
TabIndex = 1
Top = 4440
Width = 615
End
Begin VB.Timer Timer1
Left = 480
Top = 7440
End
Begin VB.Timer Timer14
Left = 9480
Top = 7920
End
Begin VB.Timer Timer13
Left = 9960
Top = 7920
End
Begin VB.Timer Timer12
Left = 9000
Top = 7920
End
Begin VB.Timer Timer11
Left = 9480
Top = 8400
End
Begin VB.Timer Timer10
Left = 9480
Top = 7440
End
Begin VB.Label Label5
Alignment = 2 'Center
BackColor = &H80000009&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 11
Top = 6720
Width = 10095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim I, F, Ps, Dh, P2 As Integer
Dim MX, MY As String
Private Sub Command1_Click()
Timer17.Enabled = False
If P2 = 1 Then
Select Case Dh
Case 1
Label5.Caption = "主角:你好~!"
Case 2
Label5.Caption = "作者:东南方有个很坏的人.我们需要打倒她.你可以帮我们吗?"
Case 3
Label5.Caption = "主角:当然可以,你有什么她的什么事?"
Case 4
Label5.Caption = "作者:她可是个很厉害的脚色.HP:" & Form2.Text3.Text & "攻击" & Form2.Text4.Text & ",你可要小心噢!"
Case 5
Label5.Caption = "主角:嗯,好的.等我的好消息!"
Case 6
Command1.Visible = False
Label5.Caption = ""
Dh = 1
End Select
End If
If P2 = 2 Then
Select Case Dh
Case 1
Label5.Caption = ""
Case 2
Label5.Caption = "主角:我打倒了她了!"
Case 3
Label5.Caption = "作者:真的吗?"
Case 4
Label5.Caption = "主角:是啊,果然是个很脚色."
Case 5
Label5.Caption = "作者:后面还有更多的故事!"
Case 6
Label5.Caption = "主角: 嗯 , 好的, 加油.我很期待呢!"
Case 7
Command1.Visible = False
Label5.Caption = ""
Dh = 1
msgbox1 = MsgBox("重新开始?", vbOKCancel, "GAMEOVER")
Select Case msgbox1
Case 1
Unload Me
Load Form2
Form2.Show
Case 2
Unload Me
Unload Form2
End Select
End Select
End If
Dh = Dh + 1
End Sub
Private Sub Form_Load()
I = 0
F = 1
Ps = 0
Dh = 1
Command1.Visible = False
Timer1.Enabled = False
Timer1.Interval = 100
Timer2.Enabled = False
Timer2.Interval = 100
Timer3.Enabled = False
Timer3.Interval = 100
Timer4.Enabled = False
Timer4.Interval = 100
Timer5.Enabled = False
Timer5.Interval = 10
Timer6.Enabled = False
Timer6.Interval = 100
Timer7.Enabled = False
Timer7.Interval = 100
Timer8.Enabled = False
Timer8.Interval = 100
Timer9.Enabled = False
Timer9.Interval = 100
Timer10.Enabled = False
Timer10.Interval = 100
Timer11.Enabled = False
Timer11.Interval = 100
Timer12.Enabled = False
Timer12.Interval = 100
Timer13.Enabled = False
Timer13.Interval = 100
Timer14.Enabled = False
Timer14.Interval = 15
Timer15.Enabled = False
Timer15.Interval = 100
Timer16.Enabled = False
Timer16.Interval = 100
Timer17.Enabled = False
Timer17.Interval = 15
ProgressBar1.Max = Form2.Text1.Text
ProgressBar1.Min = 0
ProgressBar1.Value = Form2.Text1.Text
ProgressBar2.Max = Form2.Text3.Text
ProgressBar2.Min = 0
ProgressBar2.Value = Form2.Text3.Text
Picture1.Picture = LoadPicture(App.Path & "\bmp\xz" & I & ".BMP")
Picture2.Picture = LoadPicture(App.Path & "\bmp\xz" & I & ".BMP")
P2 = 1
Picture3.Picture = LoadPicture(App.Path & "\bmp\xz" & I & ".BMP")
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MX = X - 120
MY = Y - 500
Timer5.Enabled = True
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
End Sub
Private Sub Picture2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Picture1.Left < Picture2.Left Then
MY = Picture2.Top
MX = Picture2.Left - 615
F = 4
ElseIf Picture1.Left > Picture2.Left Then
MY = Picture2.Top
MX = Picture2.Left + 615
F = 3
ElseIf Picture1.Left = Picture2.Left Then
If Picture1.Top > Picture2.Top Then
MY = Picture2.Top + 615
MX = Picture2.Left
F = 2
ElseIf Picture1.Top < Picture2.Top Then
MY = Picture2.Top - 615
MX = Picture2.Left
F = 1
End If
End If
Timer14.Enabled = True
End Sub
Private Sub Picture3_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Picture1.Left < Picture3.Left Then
MY = Picture3.Top
MX = Picture3.Left - 615
F = 4
ElseIf Picture1.Left > Picture3.Left Then
MY = Picture3.Top
MX = Picture3.Left + 615
F = 3
ElseIf Picture1.Left = Picture3.Left Then
If Picture1.Top > Picture3.Top Then
MY = Picture3.Top + 615
MX = Picture3.Left
F = 2
ElseIf Picture1.Top < Picture3.Top Then
MY = Picture3.Top - 615
MX = Picture3.Left
F = 1
End If
End If
Timer17.Enabled = True
End Sub
Private Sub Timer1_Timer()
Label5.Caption = ""
Command1.Visible = False
Select Case I
Case I
Picture1.Picture = LoadPicture(App.Path & "\bmp\sz" & I & ".BMP")
If I = 9 Then
I = -1
End If
End Select
I = I + 1
End Sub
Private Sub Timer10_Timer()
Label5.Caption = ""
Command1.Visible = False
Select Case I
Case I
Picture1.Picture = LoadPicture(App.Path & "\bmp\xk" & I & ".BMP")
Picture2.Picture = LoadPicture(App.Path & "\bmp\sk" & I & ".BMP")
If I = 9 Then
I = -1
End If
End Select
I = I + 1
Label2.Caption = Label2.Caption - Form2.Text4.Text
Label4.Caption = Label4.Caption - Form2.Text2.Text
If Label4.Caption < 0 Then
Label4.Caption = 0
ElseIf Label2.Caption < 0 Then
Label2.Caption = 0
End If
ProgressBar2.Value = Label4.Caption
ProgressBar1.Value = Label2.Caption
If ProgressBar2.Value = 0 Then
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
Timer15.Enabled = True
ElseIf ProgressBar1.Value = 0 Then
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
Timer16.Enabled = True
End If
End Sub
Private Sub Timer11_Timer()
Label5.Caption = ""
Command1.Visible = False
Select Case I
Case I
Picture1.Picture = LoadPicture(App.Path & "\bmp\sk" & I & ".BMP")
Picture2.Picture = LoadPicture(App.Path & "\bmp\xk" & I & ".BMP")
If I = 9 Then
I = -1
End If
End Select
I = I + 1
Label2.Caption = Label2.Caption - Form2.Text4.Text
Label4.Caption = Label4.Caption - Form2.Text2.Text
If Label4.Caption < 0 Then
Label4.Caption = 0
ElseIf Label2.Caption < 0 Then
Label2.Caption = 0
End If
ProgressBar2.Value = Label4.Caption
ProgressBar1.Value = Label2.Caption
If ProgressBar2.Value = 0 Then
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
Timer15.Enabled = True
ElseIf ProgressBar1.Value = 0 Then
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
Timer16.Enabled = True
End If
End Sub
Private Sub Timer12_Timer()
Label5.Caption = ""
Command1.Visible = False
Select Case I
Case I
Picture1.Picture = LoadPicture(App.Path & "\bmp\zk" & I & ".BMP")
Picture2.Picture = LoadPicture(App.Path & "\bmp\yk" & I & ".BMP")
If I = 9 Then
I = -1
End If
End Select
I = I + 1
Label2.Caption = Label2.Caption - Form2.Text4.Text
Label4.Caption = Label4.Caption - Form2.Text2.Text
If Label4.Caption < 0 Then
Label4.Caption = 0
ElseIf Label2.Caption < 0 Then
Label2.Caption = 0
End If
ProgressBar2.Value = Label4.Caption
ProgressBar1.Value = Label2.Caption
If ProgressBar2.Value = 0 Then
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
Timer15.Enabled = True
ElseIf ProgressBar1.Value = 0 Then
Timer10.Enabled = False
Timer11.Enabled = False
Timer12.Enabled = False
Timer13.Enabled = False
Timer14.Enabled = False
Timer16.Enabled = True
End If
End Sub
Private Sub Timer13_Timer()
Label5.Caption = ""
Command1.Visible = False
Select Case I
Case I
Picture1.Picture = LoadPicture(App.Path & "\bmp\yk" & I & ".BMP")
Picture2.Picture = LoadPicture(App.Path & "\bmp\zk" & I & ".BMP")
If I = 9 Then
I = -1
End If
End Select
I = I + 1
Label2.Caption = Label2.Caption - Form2.Text4.Text
Label4.Caption = Label4.Caption - Form2.Text2.Text
If Label4.Caption < 0 Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -