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

📄 form1.frm

📁 我们是厦门理工学院的学生,因为我们急需贵网站的一分重要资料下载,希望能给予下载权限,虽然上传的原码比较普通,但希望站长能给予谅解,
💻 FRM
📖 第 1 页 / 共 3 页
字号:
                  lei1(Index) = 0
                  imgLei(Index).Picture = ImageList1.ListImages(1).Picture
                End If
                LeiNums1 = LeiNums1 + 1
                ShowLeiNum Format(LeiNums, "000")
            Case 3:
                lei1(Index) = 0
                imgLei(Index).Picture = ImageList1.ListImages(1).Picture
       End Select
     
  End If

  
  imgNew.Picture = ImageList1.ListImages(6).Picture
  Timer1.Enabled = True
End Sub

Private Sub imgLei_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  If tongjiflag = True Then
      TongClick Index, False
  End If
  If LeiFlag = False Then
   imgNew.Picture = ImageList1.ListImages(5).Picture
  Else
    imgNew.Picture = ImageList1.ListImages(8).Picture
  End If
  '-------------------------------
  Dim i As Integer, j As Integer
  Dim flag As Boolean
  Dim okflag As Boolean
  okflag = False
  
  If LeiNums1 = 0 Then
       flag = False
        For i = 1 To LeiRow
         For j = 1 To LeiCol
          If lei(j, i) <> 9 And lei1((i - 1) * LeiCol + j - 1) = 2 Then
            flag = True
          End If
        Next j, i
      If flag = False Then
          imgNew.Picture = ImageList1.ListImages(11).Picture
        
        For i = 1 To LeiRow
         For j = 1 To LeiCol
          If lei1((i - 1) * LeiCol + j - 1) = 0 Then
             ShowLei i, j
          End If
        Next j, i
          
          LeiFlag = True
          okflag = True
      End If
  End If
    Dim num123 As Integer
    Dim index123 As Integer
    num123 = 0
    flag = False
  If LeiNums1 = 1 Then
       For i = 1 To LeiRow
         For j = 1 To LeiCol
          If lei1((i - 1) * LeiCol + j - 1) = 2 Or lei1((i - 1) * LeiCol + j - 1) = 1 Then
            num123 = num123 + 1
          End If
          If lei(j, i) <> 9 And lei1((i - 1) * LeiCol + j - 1) = 2 Then
            flag = True
          End If
          If lei(j, i) = 9 And lei1((i - 1) * LeiCol + j - 1) = 0 Then
            index123 = (i - 1) * LeiCol + j - 1
          End If
        Next j, i
    If flag = False And num123 = LeiCol * LeiRow - 1 Then
         imgLei(index123) = ImageList1.ListImages(4).Picture
         imgNew.Picture = ImageList1.ListImages(11).Picture
         LeiFlag = True
         okflag = True
    End If
End If
   
   If okflag = True Then
     Timer1.Enabled = False
     If jibie <> 4 Then
       If TimeNums < Val(leitime(jibie - 1)) Then
         Form5.Move Me.Left + 50, Me.Top + 1200
         Form5.Show
       End If
     End If
   End If

  '-------------------------------
End Sub

Private Sub imgNew_Click()
   imgNew.Picture = ImageList1.ListImages(5).Picture
   LeiNums1 = LeiNums
   SetSize LeiRow, LeiCol
   TimeNums = 0
   Timer1.Enabled = False
   LeiFlag = False
   Dim i As Integer
   For i = 0 To 720: lei1(i) = 0: Next
   ShowLeiNum Format(LeiNums, "000")
   ShowTime Format(0, "000")
End Sub

Private Sub imgNew_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  imgNew.Picture = ImageList1.ListImages(7).Picture
End Sub

Private Sub imgNew_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
 imgNew.Picture = ImageList1.ListImages(5).Picture
End Sub

Private Sub LeiNum_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
 imgNew.Picture = ImageList1.ListImages(6).Picture
End Sub

Private Sub LeiNum_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
 imgNew.Picture = ImageList1.ListImages(5).Picture
End Sub

Private Sub Menu_A1_Click()
  Form3.Move Me.Left + 600, Me.Top + 800
  Form3.Show
End Sub

Private Sub Menu_B_Click()
 jibie = 1
  LeiCol = 9
  LeiRow = 9
  LeiNums = 10
 imgNew_Click
 Menu_B.Checked = True
 Menu_I.Checked = False
 Menu_E.Checked = False
 Menu_C.Checked = False
End Sub

Private Sub Menu_C_Click()
 jibie = 4
 Form2.Move Me.Left + 50, Me.Top + 600
 Form2.Show
  Menu_B.Checked = False
 Menu_I.Checked = False
 Menu_E.Checked = False
 Menu_C.Checked = True
End Sub

Private Sub Menu_E_Click()
  jibie = 3
  LeiCol = 30
  LeiRow = 16
  LeiNums = 99
  imgNew_Click
   Menu_B.Checked = False
 Menu_I.Checked = False
 Menu_E.Checked = True
 Menu_C.Checked = False
End Sub

Private Sub Menu_I_Click()
 jibie = 2
  LeiCol = 16
  LeiRow = 16
  LeiNums = 40
  imgNew_Click
 Menu_B.Checked = False
 Menu_I.Checked = True
 Menu_E.Checked = False
 Menu_C.Checked = False
End Sub

Private Sub Menu_L_Click()
 Menu_L.Checked = Not Menu_L.Checked
End Sub

Private Sub Menu_M_Click()
  Menu_M.Checked = Not Menu_M.Checked
End Sub

Private Sub Menu_New_Click()
 imgNew_Click
End Sub

Private Sub Menu_S_Click()
 Menu_S.Checked = Not Menu_S.Checked
End Sub

Private Sub Menu_T_Click()
 Form4.Move Me.Left + 50, Me.Top + 1200
 Form4.Show
End Sub

Private Sub TimeNum_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  Static flag As Boolean
  imgNew.Picture = ImageList1.ListImages(6).Picture
  'flag = Not flag
 '---------------------------------------
   Dim i As Integer, j As Integer
   For i = 1 To LeiRow
    For j = 1 To LeiCol
      If lei1((i - 1) * LeiCol + j - 1) <> 2 And lei(j, i) = 9 Then
       'If flag = True Then
         imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList1.ListImages(12).Picture
       'Else
       '  imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList1.ListImages(1).Picture
       'End If
      End If
    Next j
   Next i
 
 
 
 '---------------------------------------
End Sub

Private Sub TimeNum_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
 imgNew.Picture = ImageList1.ListImages(5).Picture
End Sub

Private Sub Timer1_Timer()
  If LeiFlag = True Then Exit Sub
  TimeNums = TimeNums + 1
  If TimeNums > 999 Then TimeNums = 999
  ShowTime Format(TimeNums, "000")
End Sub

Private Sub TongClick(Index As Integer, flag As Boolean)

     Dim x As Integer, y As Integer
     
     Dim leinumss As Integer
     Dim flag123 As Boolean
     Dim tongjiflag As Boolean
     
     x = (Index Mod LeiCol) + 1
     y = Index \ LeiCol + 1
     flag123 = False
  '-------------------------------------------------
    
     If TongjiChuli1(Index) = True Then
       tongjiflag = True
     Else
      tongjiflag = False
    End If
    
  '-------------------------------------------------
     If lei1(Index) = 0 Then
      If flag = True Then
       imgLei((y - 1) * LeiCol + x - 1).Picture = ImageList2.ListImages(9).Picture
      Else
       imgLei((y - 1) * LeiCol + x - 1).Picture = ImageList1.ListImages(1).Picture
      End If
     End If
       
    TongjiChuli Index, x, y - 1, flag, flag123, tongjiflag
    TongjiChuli Index, x - 1, y - 1, flag, flag123, tongjiflag
    TongjiChuli Index, x - 1, y, flag, flag123, tongjiflag
    TongjiChuli Index, x - 1, y + 1, flag, flag123, tongjiflag
    
    TongjiChuli Index, x, y + 1, flag, flag123, tongjiflag
    TongjiChuli Index, x + 1, y + 1, flag, flag123, tongjiflag
    TongjiChuli Index, x + 1, y, flag, flag123, tongjiflag
    TongjiChuli Index, x + 1, y - 1, flag, flag123, tongjiflag
    Dim i As Integer, j As Integer
    If flag123 = True Then
             LeiFlag = True
             For i = 1 To LeiRow
                For j = 1 To LeiCol
                  If lei(j, i) = 9 And lei1((i - 1) * LeiCol + j - 1) <> 2 Then imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList1.ListImages(2).Picture
                  If lei1((i - 1) * LeiCol + j - 1) = 2 And lei(j, i) <> 9 Then imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList1.ListImages(9).Picture
             Next j, i
    End If
    
    
    
End Sub

Private Sub ShowLeiNum(strnum As String)
  LeiNum(0).Picture = ImageList3.ListImages(Val(Mid(strnum, 1, 1)) + 1).Picture
  LeiNum(1).Picture = ImageList3.ListImages(Val(Mid(strnum, 2, 1)) + 1).Picture
  LeiNum(2).Picture = ImageList3.ListImages(Val(Mid(strnum, 3, 1)) + 1).Picture
End Sub
Private Sub ShowTime(strnum As String)
  TimeNum(0).Picture = ImageList3.ListImages(Val(Mid(strnum, 1, 1)) + 1).Picture
  TimeNum(1).Picture = ImageList3.ListImages(Val(Mid(strnum, 2, 1)) + 1).Picture
  TimeNum(2).Picture = ImageList3.ListImages(Val(Mid(strnum, 3, 1)) + 1).Picture
End Sub

Private Sub Timer2_Timer()
  If tongjiflag = False Then
   imgLei_MouseDown TongjiIndex, 1, 1977, 0, 0
  End If
  Timer2.Enabled = False
End Sub
Private Sub TongjiChuli(Index As Integer, xx As Integer, yy As Integer, flag As Boolean, flag123 As Boolean, tongjiflag As Boolean)
      If xx > 0 And xx < LeiCol + 1 And yy > 0 And yy < LeiRow + 1 Then
            If lei1((yy - 1) * LeiCol + xx - 1) = 0 Then
            
              If tongjiflag = False Then
               If flag = True Then
                 imgLei((yy - 1) * LeiCol + xx - 1).Picture = ImageList2.ListImages(9).Picture
               Else
                 imgLei((yy - 1) * LeiCol + xx - 1).Picture = ImageList1.ListImages(1).Picture
               End If
              Else
               If lei(xx, yy) > 0 Then
                 imgLei((yy - 1) * LeiCol + xx - 1).Picture = ImageList2.ListImages(lei(xx, yy)).Picture
                 lei1((yy - 1) * LeiCol + xx - 1) = 1
               Else
                 imgLei((yy - 1) * LeiCol + xx - 1).Picture = ImageList2.ListImages(9).Picture
                 lei1((yy - 1) * LeiCol + xx - 1) = 1
                 ShowShui xx, yy
               End If
              End If
            End If
            If flag = True And lei1((yy - 1) * LeiCol + xx - 1) = 2 And lei(xx, yy) <> 9 Then flag123 = True
            
      End If
End Sub

Private Function TongjiChuli1(Index As Integer) As Boolean
         Dim xx As Integer, yy As Integer
         Dim x As Integer, y As Integer
         x = (Index Mod LeiCol) + 1
         y = Index \ LeiCol + 1
         TongjiChuli1 = True
       
         If tongjiflags(x, y - 1) = False Then TongjiChuli1 = False: Exit Function
         If tongjiflags(x - 1, y - 1) = False Then TongjiChuli1 = False: Exit Function
         If tongjiflags(x - 1, y) = False Then TongjiChuli1 = False: Exit Function
         If tongjiflags(x - 1, y + 1) = False Then TongjiChuli1 = False: Exit Function
         
         If tongjiflags(x, y + 1) = False Then TongjiChuli1 = False: Exit Function
         If tongjiflags(x + 1, y + 1) = False Then TongjiChuli1 = False: Exit Function
         If tongjiflags(x + 1, y) = False Then TongjiChuli1 = False: Exit Function
         If tongjiflags(x + 1, y - 1) = False Then TongjiChuli1 = False: Exit Function

End Function
Private Function tongjiflags(xx As Integer, yy As Integer) As Boolean
         tongjiflags = True
         If xx > 0 And xx < LeiCol + 1 And yy > 0 And yy < LeiRow + 1 Then
            If lei1((yy - 1) * LeiCol + xx - 1) <> 2 And lei(xx, yy) = 9 Then
              tongjiflags = False
            End If
         End If
End Function

⌨️ 快捷键说明

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