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

📄 form1.frm

📁 我们是厦门理工学院的学生,因为我们急需贵网站的一分重要资料下载,希望能给予下载权限,虽然上传的原码比较普通,但希望站长能给予谅解,
💻 FRM
📖 第 1 页 / 共 3 页
字号:
   End
   Begin VB.Menu game 
      Caption         =   "游戏(&G)"
      Begin VB.Menu Menu_New 
         Caption         =   "开局(&N)"
         Shortcut        =   {F2}
      End
      Begin VB.Menu Menu_0 
         Caption         =   "-"
      End
      Begin VB.Menu Menu_B 
         Caption         =   "初级(&B)"
      End
      Begin VB.Menu Menu_I 
         Caption         =   "中级(&I)"
      End
      Begin VB.Menu Menu_E 
         Caption         =   "高级(&E)"
         Checked         =   -1  'True
      End
      Begin VB.Menu Menu_C 
         Caption         =   "自定义(C)..."
      End
      Begin VB.Menu Menu_1 
         Caption         =   "-"
      End
      Begin VB.Menu Menu_M 
         Caption         =   "标记(?)(&M)"
         Checked         =   -1  'True
      End
      Begin VB.Menu Menu_L 
         Caption         =   "颜色(&L)"
         Checked         =   -1  'True
      End
      Begin VB.Menu Menu_S 
         Caption         =   "声音(&S)"
      End
      Begin VB.Menu Menu_2 
         Caption         =   "-"
      End
      Begin VB.Menu Menu_T 
         Caption         =   "扫雷英雄榜(&T)..."
      End
      Begin VB.Menu Menu_4 
         Caption         =   "-"
      End
      Begin VB.Menu Menu_X 
         Caption         =   "退出(&X)"
      End
   End
   Begin VB.Menu help 
      Caption         =   "帮助(&H)"
      Begin VB.Menu Menu_C1 
         Caption         =   "目录(&C)"
         Shortcut        =   {F1}
      End
      Begin VB.Menu Menu_S1 
         Caption         =   "查找帮助主题(&S)..."
      End
      Begin VB.Menu Menu_H1 
         Caption         =   "使用帮助(&H)"
      End
      Begin VB.Menu Menu_01 
         Caption         =   "-"
      End
      Begin VB.Menu Menu_A1 
         Caption         =   "关于扫雷(&A)"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**                   叶帆源码     CSDN:yefanqiu
'**-----------------------------------------------------------------------
'**叶帆源码:http://blog.csdn.net/yefanqiu  -->[叶帆源码]
'**          XP窗体界面
'**          串口通信示例
'**          任意透明窗体
'**          ...
'**叶帆软件:http://blog.csdn.net/yefanqiu  -->[叶帆软件]
'**          API 浏览器
'**          VB源码之友
'**          叶帆成语词典
'**          ...
'**最新动态:API浏览器  准备升级到 .net平台
'**          VB源码之友 准备升级到 .net平台
'**
'**更多软件,更多源码 请关注【叶帆Blog】
'**叶帆Blog:http://blog.csdn.net/yefanqiu
'*************************************************************************
'*************************************************************************
'**模 块 名:Form1
'**说    明:叶帆软件 版权所有2002 - 2004(C)
'**创 建 人:叶帆
'**日    期:2002年06月11日
'**修 改 人:
'**日    期:
'**描    述:扫雷原程序
'**版    本:V1.0
'*************************************************************************
Option Explicit
Private Sub Form_Load()
 
 Dim i As Integer, j As Integer
  For i = 1 To 24
   For j = 1 To 30
     If i = 24 And j = 30 Then GoTo exitfor
      Load imgLei((i - 1) * 30 + j)
      imgLei((i - 1) * 30 + j).Visible = True
   Next j, i
exitfor:
  '-------------------
    If Dir(App.Path + "\yefan.ini") <> "" Then
       Open App.Path + "\yefan.ini" For Input As #1
        Input #1, jibie
        Input #1, leiname(0)
        Input #1, leiname(1)
        Input #1, leiname(2)
        Input #1, leitime(0)
        Input #1, leitime(1)
        Input #1, leitime(2)
        Input #1, LeiRow
        Input #1, LeiCol
        Input #1, LeiNums
       Close #1
    Else
      jibie = 1
      leiname(0) = "佚名"
      leiname(1) = "佚名"
      leiname(2) = "佚名"
      leitime(0) = "999"
      leitime(1) = "999"
      leitime(2) = "999"
      
    End If
   
    If jibie = 4 Then jibie = 1
    Select Case jibie
      Case 1
        Menu_B_Click
      Case 2
        Menu_I_Click
      Case 3
        Menu_E_Click
      Case 4
        Menu_C_Click
    End Select
End Sub

 

Private Sub ShowLei(i As Integer, j As Integer)
  Select Case lei(j, i)
    Case 0:
      imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList2.ListImages(9).Picture
    Case 9:
      imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList1.ListImages(2).Picture
    Case Else
     imgLei((i - 1) * LeiCol + j - 1).Picture = ImageList2.ListImages(lei(j, i)).Picture
  End Select
  lei1((i - 1) * LeiCol + j - 1) = 1
End Sub

Private Sub ShowShui(col As Integer, row As Integer)
    Dim i As Integer, j As Integer
    Dim BeginX As Integer, BeginY As Integer
    Dim x As Integer, y As Integer
    
    ' 清零
    For i = 0 To 31
     For j = 0 To 25
      JieDian(i, j) = 0
    Next j, i
    '查起始点
    j = row
    While j > 0 And lei(col, j) <> 0
      j = j - 1
    Wend
    If j <> row Then y = j + 1
    
    x = col
    y = j
   
    Shui x, y
    '---------------
    
    For i = 1 To LeiRow
     For j = 1 To LeiCol
        If JieDian(j, i) = 1 Then
           If i - 1 > 0 Then ShowLei i - 1, j
           If i - 1 > 0 And j - 1 > 0 Then ShowLei i - 1, j - 1
           If j - 1 > 0 Then ShowLei i, j - 1
           If i + 1 < LeiRow + 1 And j - 1 > 0 Then ShowLei i + 1, j - 1
           
           If i + 1 < LeiRow + 1 Then ShowLei i + 1, j
           If i + 1 < LeiRow + 1 And j + 1 < LeiCol + 1 Then ShowLei i + 1, j + 1
           If j + 1 < LeiCol + 1 Then ShowLei i, j + 1
           If i - 1 > 0 And j + 1 < LeiCol + 1 Then ShowLei i - 1, j + 1
        End If
       
     Next j
    
    Next i
     
     
    '---------------
End Sub

Private Sub Shui(x As Integer, y As Integer)
  '算法一
   JieDian(x, y) = 1
   
   If y - 1 > 0 And JieDian(x, y - 1) = 0 And lei(x, y - 1) = 0 Then Shui x, y - 1
   If y - 1 > 0 And x - 1 > 0 And JieDian(x - 1, y - 1) = 0 And lei(x - 1, y - 1) = 0 Then Shui x - 1, y - 1
   If x - 1 > 0 And JieDian(x - 1, y) = 0 And lei(x - 1, y) = 0 Then Shui x - 1, y
   If y + 1 < LeiRow + 1 And x - 1 > 0 And JieDian(x - 1, y + 1) = 0 And lei(x - 1, y + 1) = 0 Then Shui x - 1, y + 1
   
   If y + 1 < LeiRow + 1 And JieDian(x, y + 1) = 0 And lei(x, y + 1) = 0 Then Shui x, y + 1
   If y + 1 < LeiRow + 1 And x + 1 < LeiCol + 1 And JieDian(x + 1, y + 1) = 0 And lei(x + 1, y + 1) = 0 Then Shui x + 1, y + 1
   If x + 1 < LeiCol + 1 And JieDian(x + 1, y) = 0 And lei(x + 1, y) = 0 Then Shui x + 1, y
   If y - 1 > 0 And x + 1 < LeiCol + 1 And JieDian(x + 1, y - 1) = 0 And lei(x + 1, y - 1) = 0 Then Shui x + 1, y - 1

End Sub


Private Sub Form_Resize()
  If MeFlag = False And Me.WindowState = 0 Then
    Me.Height = MeH
    Me.Width = Me.Width
  End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
       Open App.Path + "\yefan.ini" For Output As #1
        Print #1, jibie
        Print #1, leiname(0)
        Print #1, leiname(1)
        Print #1, leiname(2)
        Print #1, leitime(0)
        Print #1, leitime(1)
        Print #1, leitime(2)
        Print #1, LeiRow
        Print #1, LeiCol
        Print #1, LeiNums
       Close #1
       End
End Sub

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

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

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

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

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

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

Private Sub imgLei_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  If LeiFlag = True Then Exit Sub
  Static FlagNum As Integer
  Static FlagTime(1) As Long
  
  tongjiflag = False
  '-----------------------------------------------
    If Button = 1 And Shift = 0 Then
        FlagNum = 1
        FlagTime(0) = GetTickCount()
        TongjiIndex = Index
        Timer2.Enabled = True
        Exit Sub
    End If
    If Button = 2 Then
      If FlagNum = 1 Then
         FlagNum = 2
         FlagTime(1) = GetTickCount()
    
      End If
    End If
    If FlagNum = 2 And FlagTime(1) - FlagTime(0) < 50 Then
      FlagNum = 0
      tongjiflag = True
      'Text1 = "同击"
      TongClick Index, True
      Exit Sub
    End If
    
'  '同击
'  If Button = 2 And lei1(Index) = 1 And lei((Index Mod LeiCol) + 1, Index \ LeiCol + 1) <> 0 Then
'     TongClick Index
'  End If
'
  '-----------------------------------------------
  '左击
  If Button = 1 Then
        Dim i As Integer
        Dim j As Integer
       ' Text1 = "左击"
        Select Case lei((Index Mod LeiCol) + 1, Index \ LeiCol + 1)
        Case 0
           ShowShui (Index Mod LeiCol) + 1, Index \ LeiCol + 1
        Case 9
          imgNew.Picture = ImageList1.ListImages(8).Picture
          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
           imgLei(Index).Picture = ImageList1.ListImages(3).Picture
           
        Case Else
           ShowLei Index \ LeiCol + 1, (Index Mod LeiCol) + 1
        End Select
  End If
  '右击
  'If Button = 2 Then Text1 = "右击"
  If Button = 2 And lei1(Index) <> 1 Then
       
       Select Case lei1(Index)
            Case 0:
                lei1(Index) = 2
                LeiNums1 = LeiNums1 - 1
                ShowLeiNum Format(LeiNums1, "000")
                imgLei(Index).Picture = ImageList1.ListImages(4).Picture
            Case 2:
                If Menu_M.Checked = True Then
                  lei1(Index) = 3
                  imgLei(Index).Picture = ImageList1.ListImages(10).Picture
                Else

⌨️ 快捷键说明

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