📄 frmbattle.frm
字号:
ForeColor = &H00FFFFFF&
Height = 375
Left = 240
TabIndex = 12
Top = 5040
Width = 1095
End
Begin VB.Label LblItem
BackStyle = 0 'Transparent
Caption = "Item"
Enabled = 0 'False
BeginProperty Font
Name = "Arial"
Size = 17.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 360
TabIndex = 11
Top = 5400
Width = 975
End
Begin VB.Label LblAttack
BackStyle = 0 'Transparent
Caption = "Attack"
Enabled = 0 'False
BeginProperty Font
Name = "Arial"
Size = 17.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 120
TabIndex = 10
Top = 4680
Width = 1455
End
Begin VB.Label Label8
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "name"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 5400
TabIndex = 9
Top = 5160
Width = 1215
End
Begin VB.Label Label7
BackColor = &H00C00000&
BackStyle = 0 'Transparent
Caption = "MP"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 4320
TabIndex = 6
Top = 120
Visible = 0 'False
Width = 255
End
Begin VB.Label Label6
BackColor = &H00C00000&
BackStyle = 0 'Transparent
Caption = "HP"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 1680
TabIndex = 5
Top = 120
Visible = 0 'False
Width = 255
End
Begin VB.Label BadMP2
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 5760
TabIndex = 4
Top = 0
Visible = 0 'False
Width = 735
End
Begin VB.Line Line9
BorderColor = &H00C00000&
Visible = 0 'False
X1 = 5520
X2 = 5640
Y1 = 240
Y2 = 0
End
Begin VB.Label BadMP1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 4680
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 735
End
Begin VB.Label BadHP2
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 3000
TabIndex = 2
Top = 0
Visible = 0 'False
Width = 735
End
Begin VB.Line Line6
BorderColor = &H00C00000&
Visible = 0 'False
X1 = 2760
X2 = 2880
Y1 = 240
Y2 = 0
End
Begin VB.Label BadHP1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 1920
TabIndex = 1
Top = 0
Visible = 0 'False
Width = 735
End
Begin VB.Label LblEnemy
BackStyle = 0 'Transparent
Caption = "name"
ForeColor = &H00FFFFFF&
Height = 255
Left = 120
TabIndex = 0
Top = 120
Visible = 0 'False
Width = 1215
End
Begin VB.Image bad2
Height = 1425
Left = 3720
Picture = "FrmBattle.frx":3B32
Top = 1320
Width = 1500
End
Begin VB.Image Bad1
Height = 2895
Left = 2520
Picture = "FrmBattle.frx":AACA
Top = 1320
Width = 3000
End
Begin VB.Image bad6
Height = 2490
Left = 3120
Picture = "FrmBattle.frx":26F66
Top = 1080
Width = 2250
End
Begin VB.Image bad5
Height = 2295
Left = 2760
Picture = "FrmBattle.frx":394C0
Top = 1200
Width = 2550
End
Begin VB.Image bad4
Height = 2145
Left = 3240
Picture = "FrmBattle.frx":4C702
Top = 1440
Width = 1800
End
Begin VB.Image BAD3
Height = 2355
Left = 3360
Picture = "FrmBattle.frx":5905E
Top = 1200
Width = 1800
End
Begin VB.Image Image2
Height = 1215
Left = 0
Picture = "FrmBattle.frx":66D6A
Top = 4560
Width = 1815
End
Begin VB.Image Image4
Height = 495
Left = 3480
Picture = "FrmBattle.frx":6E0DA
Top = 5040
Width = 1815
End
Begin VB.Image Image5
Height = 1575
Left = 0
Picture = "FrmBattle.frx":7100A
Stretch = -1 'True
Top = 3000
Width = 1815
End
Begin VB.Image Image6
Height = 255
Left = 1800
Picture = "FrmBattle.frx":79BC2
Top = 5520
Width = 3495
End
Begin VB.Image Image3
Height = 495
Left = 1800
Picture = "FrmBattle.frx":7CA82
Stretch = -1 'True
Top = 5040
Width = 1695
End
Begin VB.Image BG
Height = 1455
Left = 240
Picture = "FrmBattle.frx":7F9B2
Top = 360
Width = 2295
End
End
Attribute VB_Name = "FrmBattle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'music
MMControl1.Command = "open"
MMControl1.Command = "play"
SpeedBar.Value = 0
'settings for the badguy
Randomize
hp = 2000 + Int(3000 * Rnd)
mp = 30 + Int(50 * Rnd)
BadHP1.Caption = hp
BadHP2.Caption = BadHP1.Caption
BadMP1.Caption = mp
BadMP2.Caption = BadMP1.Caption
badselect = 1 + Int(6 * Rnd)
Select Case badselect
Case 1
lblenemy.Caption = "ArmoredGarb"
Bad1.Visible = True
bad2.Visible = False
Bad3.Visible = False
bad4.Visible = False
Bad5.Visible = False
bad6.Visible = False
Case 2
lblenemy.Caption = "Furball"
Bad1.Visible = False
bad2.Visible = True
Bad3.Visible = False
bad4.Visible = False
Bad5.Visible = False
bad6.Visible = False
Case 3
lblenemy.Caption = "WhiteSerpent"
Bad1.Visible = False
bad2.Visible = False
Bad3.Visible = True
bad4.Visible = False
Bad5.Visible = False
bad6.Visible = False
Case 4
lblenemy.Caption = "ElfCreature"
Bad1.Visible = False
bad2.Visible = False
Bad3.Visible = False
bad4.Visible = True
Bad5.Visible = False
bad6.Visible = False
Case 5
lblenemy.Caption = "SnowMammoth"
Bad1.Visible = False
bad2.Visible = False
Bad3.Visible = False
bad4.Visible = False
Bad5.Visible = True
bad6.Visible = False
Case 6
lblenemy.Caption = "PoisonVines"
Bad1.Visible = False
bad2.Visible = False
Bad3.Visible = False
bad4.Visible = False
Bad5.Visible = False
bad6.Visible = True
End Select
Lbl1.Caption = "You have entered battle with a " + lblenemy.Caption
End Sub
Private Sub LblAttack_Click()
timer3.Enabled = True
LblAttack.Enabled = False
LblMagic.Enabled = False
LblItem.Enabled = False
SpeedBar.Value = 0
Lbl1.Caption = TxtName.Text + " has attacked the " + lblenemy.Caption
End Sub
Private Sub LblItem_Click()
LblAttack.Enabled = False
LblMagic.Enabled = False
LblItem.Enabled = False
SpeedBar.Value = 0
If Option1.Value = True Then
Timer8.Enabled = True
ElseIf Option2.Value = True Then
Timer9.Enabled = True
ElseIf Option3.Value = True Then
Timer10.Enabled = True
Else
MsgBox "please select an item"
End If
End Sub
Private Sub LblMagic_Click()
Timer4.Enabled = True
LblAttack.Enabled = False
LblMagic.Enabled = False
LblItem.Enabled = False
SpeedBar.Value = 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -