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

📄 form2.frm

📁 matematic game design by yunif4 and bayu h
💻 FRM
📖 第 1 页 / 共 4 页
字号:
If waruirengs = False Then
    If urutan_click = 0 Then
        Image1.Picture = Imagewi.Picture
        urutan_click = urutan_click + 1
        Labeln11.Caption = Labeln1.Caption
        puser11 = Labeln11.Caption
    ElseIf urutan_click = 1 Then
        Image2.Picture = Imagewi.Picture
        urutan_click = urutan_click + 1
        Labeln21.Caption = Labeln1.Caption
        puser12 = Labeln21.Caption
    ElseIf urutan_click = 2 Then
        Image3.Picture = Imagewi.Picture
        urutan_click = urutan_click + 1
        Labeln31.Caption = Labeln1.Caption
        puser22 = Labeln31.Caption
    ElseIf urutan_click = 3 Then
        Image4.Picture = Imagewi.Picture
        urutan_click = urutan_click + 1
        Labeln41.Caption = Labeln1.Caption
        puser32 = Labeln41.Caption
        wes1 = True
    End If
    waruirengs = True
End If
End Sub
Private Sub hitungkamu()
    hasilu11.Text = puser11
    hasilu12.Text = puser12
    hasilu13.Text = puser13
    hasilu21.Text = puser21
    hasilu22.Text = puser22
    hasilu23.Text = puser23
    hasilu31.Text = puser31
    hasilu32.Text = puser32
    hasilu33.Text = puser33
End Sub
Private Sub kartukembali()
Imagekri.Left = 56
Imagekri.top = 352
Imagewaj.Left = 56
Imagewaj.top = 352
Imagewa.Left = 56
Imagewa.top = 352
Imagewi.Left = 56
Imagewi.top = 352
Labeln1.Caption = ""
Labeln2.Caption = ""
Labeln3.Caption = ""
Labeln4.Caption = ""
End Sub
Private Sub hitung()
If Label111.ForeColor = &H0 Then
    puser13 = puser11 + puser12
    operasiu1.Text = "+"
ElseIf Label112.ForeColor = &H0 Then
    puser13 = puser11 - puser12
    operasiu1.Text = "-"
ElseIf Label113.ForeColor = &H0 Then
    puser13 = puser11 * puser12
    operasiu1.Text = "x"
End If
puser21 = puser13
If Label21.ForeColor = &H0 Then
    puser23 = puser21 + puser22
    operasiu2.Text = "+"
ElseIf Label22.ForeColor = &H0 Then
    puser23 = puser21 - puser22
    operasiu2.Text = "-"
ElseIf Label23.ForeColor = &H0 Then
    puser23 = puser21 * puser22
    operasiu2.Text = "x"
End If
puser31 = puser23
If Label31.ForeColor = &H0 Then
    puser33 = puser31 + puser32
    operasiu3.Text = "+"
ElseIf Label32.ForeColor = &H0 Then
    puser33 = puser31 - puser32
    operasiu3.Text = "-"
ElseIf Label33.ForeColor = &H0 Then
    puser33 = puser31 * puser32
    operasiu3.Text = "x"
End If
puser21 = puser13
End Sub

Private Sub Label1_Click()
Unload Me
End Sub

Private Sub Label11_Click()
Framelevel.Visible = False
End Sub

Private Sub Label111_Click()
'puser13 = puser11 + puser12
'puser21 = puser13
Label111.ForeColor = &H0
Label112.ForeColor = &HFFFFFF
Label113.ForeColor = &HFFFFFF
wes2 = True
hitung
End Sub

Private Sub Label112_Click()
'puser13 = puser11 - puser12
'puser21 = puser13
Label111.ForeColor = &HFFFFFF
Label112.ForeColor = &H0
Label113.ForeColor = &HFFFFFF
wes2 = True
hitung
End Sub

Private Sub Label113_Click()
'puser13 = puser11 * puser12
'puser21 = puser13
Label111.ForeColor = &HFFFFFF
Label112.ForeColor = &HFFFFFF
Label113.ForeColor = &H0
wes2 = True
hitung
End Sub

Private Sub Label21_Click()
'puser23 = puser21 + puser22
'puser31 = puser23
Label21.ForeColor = &H0
Label22.ForeColor = &HFFFFFF
Label23.ForeColor = &HFFFFFF
wes3 = True
hitung
End Sub

Private Sub Label22_Click()
'puser23 = puser21 - puser22
'puser31 = puser23
Label21.ForeColor = &HFFFFFF
Label22.ForeColor = &H0
Label23.ForeColor = &HFFFFFF
wes3 = True
hitung
End Sub

Private Sub Label23_Click()
'puser23 = puser21 * puser22
'puser31 = puser23
Label21.ForeColor = &HFFFFFF
Label22.ForeColor = &HFFFFFF
Label23.ForeColor = &H0
wes3 = True
hitung
End Sub

Private Sub Label31_Click()
'puser33 = puser31 + puser32
Label31.ForeColor = &H0
Label32.ForeColor = &HFFFFFF
Label33.ForeColor = &HFFFFFF
wes4 = True

hitung
End Sub

Private Sub Label32_Click()
'puser33 = puser31 - puser32
Label31.ForeColor = &HFFFFFF
Label32.ForeColor = &H0
Label33.ForeColor = &HFFFFFF
wes4 = True

hitung
End Sub

Private Sub Label33_Click()
'puser33 = puser31 * puser32
Label31.ForeColor = &HFFFFFF
Label32.ForeColor = &HFFFFFF
Label33.ForeColor = &H0
wes4 = True

hitung
End Sub

Private Sub Labelbuttonfinish_Click()
If wes1 = False Or wes2 = False Or wes3 = False Or wes4 = False Then
    ilep.Caption = "NGURUD SOB"
    Exit Sub
End If
sudahhitung = True

If puser33 = nilaih Then
    ilep.Caption = "UMAK RETNIP"
    nilai = nilai + jumkurnilai
    Timer8.Enabled = True
    poinuser = poinuser + 1
Else
    ilep.Caption = "AMPUS BON ODOB"
    nilai = nilai - (jumkurnilai / 2)
    hitungkamu
    Timer9.Enabled = True
    poinkompi = poinkompi + 1
End If

Timer1.Enabled = False
kartukembali
End Sub
Private Sub cari_time()
bilrandom = Val(Mid(Text1.Text, 6, 2))
If bilrandom >= 50 Then
    n = bilrandom
ElseIf bilrandom >= 40 And bilrandom < 50 Then
    n = bilrandom + 9
ElseIf bilrandom >= 30 And bilrandom < 40 Then
    n = bilrandom + 19
ElseIf bilrandom >= 20 And bilrandom < 30 Then
    n = bilrandom + 29
ElseIf bilrandom >= 20 And bilrandom < 10 Then
    n = bilrandom + 39
Else
    n = bilrandom + 49
End If
End Sub
Private Sub putihsemua()
Label111.ForeColor = &HFFFFFF
Label112.ForeColor = &HFFFFFF
Label113.ForeColor = &HFFFFFF
Label21.ForeColor = &HFFFFFF
Label22.ForeColor = &HFFFFFF
Label23.ForeColor = &HFFFFFF
Label31.ForeColor = &HFFFFFF
Label32.ForeColor = &HFFFFFF
Label33.ForeColor = &HFFFFFF
End Sub

Private Sub Labelmulai_Click()
Dim i As Integer
'Timer9.Enabled = True
putihsemua
framehilang
ilep.Caption = "MONGGO"
cari_time
jumkurnilai = n
Text2.Text = n & " " & bilrandom
If sudahhitung = False Then
    nilai = nilai - (jumkurnilai / 4)
End If
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
Image3.Picture = LoadPicture("")
Image4.Picture = LoadPicture("")
Labeln11 = ""
Labeln21 = ""
Labeln31 = ""
Labeln41 = ""
wajiks = False
waruabangs = False
waruirengs = False
kritings = False
urutan_click = 0
Timer3.Enabled = True
Timer1.Enabled = True
Timer2.Enabled = False
For i = 1 To nn
    nilai1 = Fix(Rnd * 9 + 1)
    nilai2 = Fix(Rnd * 9 + 1)
    nilai3 = Fix(Rnd * 9 + 1)
    nilai4 = Fix(Rnd * 9 + 1)
Next
penyim11 = nilai1
penyim12 = nilai2
penyim13 = rOper(penyim11, penyim12, top1)
penyim21 = penyim13
penyim22 = nilai3
penyim23 = rOper(penyim13, nilai3, top2)
penyim31 = penyim23
penyim32 = nilai4
penyim33 = rOper(penyim23, nilai4, top3)
nilaih = penyim33
'cit
tc11.Text = penyim11
tc12.Text = penyim12
tc13.Text = penyim13
tc21.Text = penyim21
tc22.Text = penyim22
tc23.Text = penyim23
tc31.Text = penyim31
tc32.Text = penyim32
tc33.Text = penyim33
Timer2.Enabled = True
sudahhitung = False
wes1 = False
wes2 = False
wes3 = False
wes4 = False
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
    Case vbKeyF1
        FrameCit.top = 248
        FrameCit.Left = 240
    Case vbKeyF2
        framehilang
End Select
End Sub

Private Sub Form_Load()
lnilai.Caption = nilai
sudahhitung = True
level = 1
End Sub



Private Sub Labeln1_Click()
Imagewi_Click
End Sub

Private Sub Labeln2_Click()
Imagekri_Click
End Sub

Private Sub Labeln3_Click()
Imagewaj_Click
End Sub

Private Sub Labeln4_Click()
Imagewa_Click
End Sub

Private Sub LabelOption_Click()
    Unload Me
End Sub

Private Sub Timer1_Timer()

n = n - 1
Label4.Caption = n
If n = 0 Then
Timer1.Enabled = False
ilep.Caption = "G'NOK USAHA BLAS"
kartukembali
n = bilrandom
nilai = nilai - jumkurnilai
poinkompi = poinkompi + 1
lnilai.Caption = nilai
End If
End Sub

Private Sub Timer2_Timer()
nn = nn + 1
If nn = 100 Then
    nn = 1
End If
End Sub
Private Sub Timer3_Timer()

If Imagewi.top > 125 Then
    Imagewi.top = Imagewi.top - 5
Else
    Imagewi.top = 120
    Imagewi.Left = 48
    Timer4.Enabled = True
    Timer3.Enabled = False
    
End If

End Sub

Private Sub Timer4_Timer()
If Imagekri.top > 125 Then
    Imagekri.top = Imagekri.top - 5
Else
    Imagekri.top = 120
    Timer4.Enabled = False
    Timer5.Enabled = True
    
End If
If Imagekri.Left < 185 Then
    Imagekri.Left = Imagekri.Left + 5
Else
    Imagekri.Left = 185

End If
End Sub

Private Sub Timer5_Timer()
If Imagewaj.top > 125 Then
    Imagewaj.top = Imagewaj.top - 5
Else
    Imagewaj.top = 120
End If
If Imagewaj.Left < 320 Then
    Imagewaj.Left = Imagewaj.Left + 5
Else
    Timer6.Enabled = True
    Timer5.Enabled = False
    Imagewaj.Left = 320
    
End If
End Sub

Private Sub Timer6_Timer()
If Imagewa.top > 125 Then
    Imagewa.top = Imagewa.top - 5
Else
    
    Imagewa.top = 120
End If
If Imagewa.Left < 458 Then
    Imagewa.Left = Imagewa.Left + 5
Else
    Timer6.Enabled = False
    Imagewa.Left = 458
    tampaknilai
    Labeln1.Caption = nilai1
    Labeln2.Caption = nilai2
    Labeln3.Caption = nilai3
    Labeln4.Caption = nilai4
    Labelh.Caption = nilaih
End If
vkartugerak = True

End Sub
Private Sub tampaknilai()
    Labeln4.Visible = True
    Labeln3.Visible = True
    Labeln2.Visible = True
    Labeln1.Visible = True
    Labelh.Visible = True
    Labeln41.Visible = True
    Labeln31.Visible = True
    Labeln21.Visible = True
    Labeln11.Visible = True
End Sub

Private Sub Timer7_Timer()
    lnilai.Caption = nilai
    Text1.Text = Time
    lpoinkompi.Caption = poinkompi
    lpoinuser.Caption = poinuser
    If poinuser + poinkompi = 5 Then
        If poinuser >= 3 Then
            level = level + 1
            Framelevel.Visible = True
        Else
            ilep.Caption = "LEVEL PATET"
        End If
        poinuser = 0
        poinkompi = 0
        
    End If
    Select Case level
        Case 1
            Labellevel = "I"
        Case 2
            Labellevel = "II"
        Case 3
            Labellevel = "III"
        Case 4
            Labellevel = "IV"
        Case 5
            Labellevel = "V"
        Case 6
            Labellevel = "VI"
        Case 7
            Labellevel = "VII"
    End Select
End Sub

Private Sub Timer8_Timer()
If FrameCit.Left > 256 Then
    FrameCit.Left = FrameCit.Left - 15
Else
    FrameCit = 256
    Timer8.Enabled = False
End If
End Sub

Private Sub Timer9_Timer()
If Framehasilu.Left > 256 Then
    Framehasilu.Left = Framehasilu.Left - 15
Else
    Framehasilu = 256
    Timer9.Enabled = False
End If
End Sub

⌨️ 快捷键说明

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