求VB小游戏代码。急求。
是自己做的,网上太多一样的了,重复了要倒扣分的~~~~~~·谢谢、万分感谢。最好详细说明思路,变态的老师要求我们讲解。简单且涉及面大····在后天早上就要交的。希望得到大...
是自己做的,网上太多一样的了,
重复了要倒扣分的~~~~~~·谢谢、万分感谢。
最好详细说明思路,变态的老师要求我们讲解。
简单且涉及面大····
在后天早上就要交的。希望得到大家的帮助。 展开
重复了要倒扣分的~~~~~~·谢谢、万分感谢。
最好详细说明思路,变态的老师要求我们讲解。
简单且涉及面大····
在后天早上就要交的。希望得到大家的帮助。 展开
2个回答
展开全部
这是我自己做的有代码、工程文件,你可以留下邮箱,我给你发
Public i As Integer
Public j As Integer
Public mm As Integer
Private Sub Command1_Click()
i = i + 1
Text1 = i
Command1.Visible = False
End Sub
Private Sub Command2_Click()
i = i + 1
Text1 = i
Command2.Visible = False
End Sub
Private Sub Command3_Click()
i = i + 1
Text1 = i
Command3.Visible = False
End Sub
Private Sub Command4_Click()
i = i + 1
Text1 = i
Command4.Visible = False
End Sub
Private Sub Command5_Click()
i = i + 1
Text1 = i
Command5.Visible = False
End Sub
Private Sub Command6_Click()
i = i + 1
Text1 = i
Command6.Visible = False
End Sub
Private Sub Image1_Click()
i = i + 1
Text1 = i
Image1.Visible = False
End Sub
Private Sub Command7_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Label4.Visible = False
mm = 0
i = 0
Text1 = 0
End Sub
Private Sub Form_Load()
j = 600
Label3.Caption = "最易"
Label4.Visible = False
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub Timer1_Timer()
Dim x As Integer
If Command1.Top <= 3000 Then
x = Command1.Top
Command1.Top = x + j * Rnd
ElseIf Command1.Top > 3000 Then
Command1.Visible = True
Command1.Left = 3000 * Rnd
Command1.Top = 0
x = Command1.Top
Command1.Top = x + j * Rnd
End If
If Command2.Top <= 3000 Then
x = Command2.Top
Command2.Top = x + j * Rnd
Else
Command2.Visible = True
Command2.Left = 3000 * Rnd
Command2.Top = 0
x = Command2.Top
Command2.Top = x + j * Rnd
End If
If Command3.Top <= 3000 Then
x = Command3.Top
Command3.Top = x + j * Rnd
Else
Command3.Visible = True
Command3.Left = 3000 * Rnd
Command3.Top = 0
x = Command3.Top
Command3.Top = x + j * Rnd
End If
If Command4.Top <= 3000 Then
x = Command4.Top
Command4.Top = x + j * Rnd
Else
Command4.Visible = True
Command4.Left = 3000 * Rnd
Command4.Top = 0
x = Command4.Top
Command4.Top = x + j * Rnd
End If
If Command1.Top <= 3000 Then
x = Command5.Top
Command5.Top = x + j * Rnd
Else
Command5.Visible = True
Command5.Left = 3000 * Rnd
Command5.Top = 0
x = Command5.Top
Command5.Top = x + j * Rnd
End If
If Command1.Top <= 3000 Then
x = Command6.Top
Command6.Top = x + j * Rnd
Else
Command6.Visible = True
Command6.Left = 3000 * Rnd
Command6.Top = 0
x = Command6.Top
Command6.Top = x + j * Rnd
End If
End Sub
Private Sub Timer2_Timer()
Dim m As Integer
Dim n As Integer
m = Dialog.Text1
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
Command4.Visible = False
Command5.Visible = False
Command6.Visible = False
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Label4.Visible = True
Label4.Caption = "速度:" & m & Chr(13) & Chr(10) & "难度:" & Label3.Caption & Chr(13) & Chr(10) & "杀猪数:" & Text1
End Sub
Private Sub Timer3_Timer()
Dim kk As Integer
mm = mm + 1
kk = mm / 10
Label5.Caption = kk
End Sub
Private Sub 极难_Click()
j = 3000
Label3.Caption = "极难"
End Sub
Private Sub 开局_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Label4.Visible = False
mm = 0
i = 0
Text1 = 0
End Sub
Private Sub 困难_Click()
j = 2400
Label3.Caption = "困难"
End Sub
Private Sub 容易_Click()
j = 1200
Label3.Caption = "容易"
End Sub
Private Sub 退出_Click()
End
End Sub
Private Sub 中等_Click()
j = 1800
Label3.Caption = "中等"
End Sub
Private Sub 自定义_Click()
Dialog.Visible = True
End Sub
Private Sub 最易_Click()
j = 600
Label3.Caption = "最易"
End Sub
Public i As Integer
Public j As Integer
Public mm As Integer
Private Sub Command1_Click()
i = i + 1
Text1 = i
Command1.Visible = False
End Sub
Private Sub Command2_Click()
i = i + 1
Text1 = i
Command2.Visible = False
End Sub
Private Sub Command3_Click()
i = i + 1
Text1 = i
Command3.Visible = False
End Sub
Private Sub Command4_Click()
i = i + 1
Text1 = i
Command4.Visible = False
End Sub
Private Sub Command5_Click()
i = i + 1
Text1 = i
Command5.Visible = False
End Sub
Private Sub Command6_Click()
i = i + 1
Text1 = i
Command6.Visible = False
End Sub
Private Sub Image1_Click()
i = i + 1
Text1 = i
Image1.Visible = False
End Sub
Private Sub Command7_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Label4.Visible = False
mm = 0
i = 0
Text1 = 0
End Sub
Private Sub Form_Load()
j = 600
Label3.Caption = "最易"
Label4.Visible = False
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub Timer1_Timer()
Dim x As Integer
If Command1.Top <= 3000 Then
x = Command1.Top
Command1.Top = x + j * Rnd
ElseIf Command1.Top > 3000 Then
Command1.Visible = True
Command1.Left = 3000 * Rnd
Command1.Top = 0
x = Command1.Top
Command1.Top = x + j * Rnd
End If
If Command2.Top <= 3000 Then
x = Command2.Top
Command2.Top = x + j * Rnd
Else
Command2.Visible = True
Command2.Left = 3000 * Rnd
Command2.Top = 0
x = Command2.Top
Command2.Top = x + j * Rnd
End If
If Command3.Top <= 3000 Then
x = Command3.Top
Command3.Top = x + j * Rnd
Else
Command3.Visible = True
Command3.Left = 3000 * Rnd
Command3.Top = 0
x = Command3.Top
Command3.Top = x + j * Rnd
End If
If Command4.Top <= 3000 Then
x = Command4.Top
Command4.Top = x + j * Rnd
Else
Command4.Visible = True
Command4.Left = 3000 * Rnd
Command4.Top = 0
x = Command4.Top
Command4.Top = x + j * Rnd
End If
If Command1.Top <= 3000 Then
x = Command5.Top
Command5.Top = x + j * Rnd
Else
Command5.Visible = True
Command5.Left = 3000 * Rnd
Command5.Top = 0
x = Command5.Top
Command5.Top = x + j * Rnd
End If
If Command1.Top <= 3000 Then
x = Command6.Top
Command6.Top = x + j * Rnd
Else
Command6.Visible = True
Command6.Left = 3000 * Rnd
Command6.Top = 0
x = Command6.Top
Command6.Top = x + j * Rnd
End If
End Sub
Private Sub Timer2_Timer()
Dim m As Integer
Dim n As Integer
m = Dialog.Text1
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
Command4.Visible = False
Command5.Visible = False
Command6.Visible = False
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Label4.Visible = True
Label4.Caption = "速度:" & m & Chr(13) & Chr(10) & "难度:" & Label3.Caption & Chr(13) & Chr(10) & "杀猪数:" & Text1
End Sub
Private Sub Timer3_Timer()
Dim kk As Integer
mm = mm + 1
kk = mm / 10
Label5.Caption = kk
End Sub
Private Sub 极难_Click()
j = 3000
Label3.Caption = "极难"
End Sub
Private Sub 开局_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Label4.Visible = False
mm = 0
i = 0
Text1 = 0
End Sub
Private Sub 困难_Click()
j = 2400
Label3.Caption = "困难"
End Sub
Private Sub 容易_Click()
j = 1200
Label3.Caption = "容易"
End Sub
Private Sub 退出_Click()
End
End Sub
Private Sub 中等_Click()
j = 1800
Label3.Caption = "中等"
End Sub
Private Sub 自定义_Click()
Dialog.Visible = True
End Sub
Private Sub 最易_Click()
j = 600
Label3.Caption = "最易"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询