英语翻译Private Sub cmdgame_Click() Formstart.ShowUnload MeEnd S
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/17 08:03:43
英语翻译
Private Sub cmdgame_Click()
Formstart.Show
Unload Me
End Sub
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdstart_Click()
Formlevel1.MousePointer = 2
Label1.Visible = False
If cmdstart.Caption = "开始" Then
Timerimage.Enabled = True
Timertime.Enabled = True
cmdstart.Caption = "重来"
Else
Labelscore.Caption = 0
Labeltime.Caption = 60
Timerimage.Enabled = True
Timertime.Enabled = True
cmdstart.Caption = "开始"
End If
End Sub
Private Sub Image1_Click()
Image1.Visible = False
Call addscore
End Sub
Private Sub Image2_Click()
Image2.Visible = False
Call reducescore
End Sub
Private Sub Image3_Click()
Image3.Visible = False
Call addscore
End Sub
Private Sub Image4_Click()
Image4.Visible = False
Call reducescore
End Sub
Private Sub Image5_Click()
Image5.Visible = False
Call addscore
End Sub
Private Sub Image6_Click()
Image6.Visible = False
Call addscore
End Sub
Private Sub Image7_Click()
Image7.Visible = False
Call reducescore
End Sub
Private Sub Image8_Click()
Image8.Visible = False
Call reducescore
End Sub
Private Sub Image9_Click()
Image9.Visible = False
Call addscore
End Sub
Private Sub Image10_Click()
Image10.Visible = False
Call addscore
End Sub
Public Sub addscore()
Labelscore.Caption = Labelscore.Caption + 1
If Labelscore.Caption > 30 Then
MsgBox "恭喜闯关成功,你真厉害!",vbOKOnly,"结果"
Formlevel2.Show
Unload Me
End If
End Sub
Public Sub reducescore()
Labelscore.Caption = Labelscore.Caption - 1
End Sub
Private Sub timerimage_timer()
Dim a As Integer
Randomize
a = Int(Rnd * 10) + 1 '产生1~10随机数
.
Private Sub timer1_timer()
Image1.Visible = False
Timer1.Enabled = False
End Sub
Private Sub timer2_timer()
Image2.Visible = False
Timer2.Enabled = False
End Sub
Private Sub timer3_timer()
Image3.Visible = False
Timer3.Enabled = False
End Sub
Private Sub timer4_timer()
Image4.Visible = False
Timer4.Enabled = False
End Sub
Private Sub timer5_timer()
Image5.Visible = False
Timer5.Enabled = False
End Sub
Private Sub timer6_timer()
Image6.Visible = False
Timer6.Enabled = False
End Sub
Private Sub timer7_timer()
Image7.Visible = False
Timer7.Enabled = False
End Sub
Private Sub timer8_timer()
Image8.Visible = False
Timer8.Enabled = False
End Sub
Private Sub timer9_timer()
Image9.Visible = False
Timer9.Enabled = False
End Sub
Private Sub timer10_timer()
Image10.Visible = False
Timer10.Enabled = False
End Sub
Private Sub Timertime_Timer()
Labeltime.Caption = Labeltime.Caption - 1
If Labeltime.Caption = 0 Then
If Labelscore.Caption < 30 Then
Timerimage.Enabled = False
Timertime.Enabled = False
MsgBox "时间到!闯关失败,请继续努力!",vbOKOnly,"结果"
Formlevel1.MousePointer = 0
cmdstart.Caption = "重来"
Else
Formlevel1.MousePointer = 0
Timerimage.Enabled = False
Timertime.Enabled = False
End If
End If
End Sub
Private Sub cmdgame_Click()
Formstart.Show
Unload Me
End Sub
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdstart_Click()
Formlevel1.MousePointer = 2
Label1.Visible = False
If cmdstart.Caption = "开始" Then
Timerimage.Enabled = True
Timertime.Enabled = True
cmdstart.Caption = "重来"
Else
Labelscore.Caption = 0
Labeltime.Caption = 60
Timerimage.Enabled = True
Timertime.Enabled = True
cmdstart.Caption = "开始"
End If
End Sub
Private Sub Image1_Click()
Image1.Visible = False
Call addscore
End Sub
Private Sub Image2_Click()
Image2.Visible = False
Call reducescore
End Sub
Private Sub Image3_Click()
Image3.Visible = False
Call addscore
End Sub
Private Sub Image4_Click()
Image4.Visible = False
Call reducescore
End Sub
Private Sub Image5_Click()
Image5.Visible = False
Call addscore
End Sub
Private Sub Image6_Click()
Image6.Visible = False
Call addscore
End Sub
Private Sub Image7_Click()
Image7.Visible = False
Call reducescore
End Sub
Private Sub Image8_Click()
Image8.Visible = False
Call reducescore
End Sub
Private Sub Image9_Click()
Image9.Visible = False
Call addscore
End Sub
Private Sub Image10_Click()
Image10.Visible = False
Call addscore
End Sub
Public Sub addscore()
Labelscore.Caption = Labelscore.Caption + 1
If Labelscore.Caption > 30 Then
MsgBox "恭喜闯关成功,你真厉害!",vbOKOnly,"结果"
Formlevel2.Show
Unload Me
End If
End Sub
Public Sub reducescore()
Labelscore.Caption = Labelscore.Caption - 1
End Sub
Private Sub timerimage_timer()
Dim a As Integer
Randomize
a = Int(Rnd * 10) + 1 '产生1~10随机数
.
Private Sub timer1_timer()
Image1.Visible = False
Timer1.Enabled = False
End Sub
Private Sub timer2_timer()
Image2.Visible = False
Timer2.Enabled = False
End Sub
Private Sub timer3_timer()
Image3.Visible = False
Timer3.Enabled = False
End Sub
Private Sub timer4_timer()
Image4.Visible = False
Timer4.Enabled = False
End Sub
Private Sub timer5_timer()
Image5.Visible = False
Timer5.Enabled = False
End Sub
Private Sub timer6_timer()
Image6.Visible = False
Timer6.Enabled = False
End Sub
Private Sub timer7_timer()
Image7.Visible = False
Timer7.Enabled = False
End Sub
Private Sub timer8_timer()
Image8.Visible = False
Timer8.Enabled = False
End Sub
Private Sub timer9_timer()
Image9.Visible = False
Timer9.Enabled = False
End Sub
Private Sub timer10_timer()
Image10.Visible = False
Timer10.Enabled = False
End Sub
Private Sub Timertime_Timer()
Labeltime.Caption = Labeltime.Caption - 1
If Labeltime.Caption = 0 Then
If Labelscore.Caption < 30 Then
Timerimage.Enabled = False
Timertime.Enabled = False
MsgBox "时间到!闯关失败,请继续努力!",vbOKOnly,"结果"
Formlevel1.MousePointer = 0
cmdstart.Caption = "重来"
Else
Formlevel1.MousePointer = 0
Timerimage.Enabled = False
Timertime.Enabled = False
End If
End If
End Sub
![英语翻译Private Sub cmdgame_Click() Formstart.ShowUnload MeEnd S](/uploads/image/z/17529907-67-7.jpg?t=%E8%8B%B1%E8%AF%AD%E7%BF%BB%E8%AF%91Private+Sub+cmdgame_Click%28%29+Formstart.ShowUnload+MeEnd+S)
这段程序是一个游戏的部分代码,在主窗口内有一些运动的图片,点到图片1,3,5,6,9,10时加1分,点到图片2,4,7,8时减1分,当分数大于30分时,显示对话框提示过关,否则到时间限制(Timetimer 和 Interval属性指定的时间)则提示闯关失败.
英语翻译Private Sub Worksheet_Activate()End SubPrivate Sub Works
英语翻译private sub check1_click()label1.fontbold=iif(check1.val
英语翻译Private Sub Form_Activate()If find = True ThenForm4.ZOrd
英语翻译控制标签移动private sub timer1_timer()if label1.left
Private Sub Form_Click()
private sub score_lostfocus( )
Private Sub Command1_Click()
Private Sub Command_1Click()
vb Private Sub Command1_Click()
private sub command1_click()
Private Sub Form_Load()
1.Private Sub Form_Click()