当前位置: 网学 > 编程文档 > VB > 正文

VB扫雷源代码

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
bsp;       Next
          Next
          If mNumber = 0 Then
             ''如果没有雷在其四周则打开当前位置
             What(X, Y) = 0
             Save(X, Y) = 0
          Else
             ''写入雷数
             What(X, Y) = mNumber
             Save(X, Y) = mNumber
          End If
       End If
    Next
Next
End Sub

Private Sub Timer1_Timer()
Dim sTime As String
Dim mM As Long
Dim mS As Long
Dim sM As String
Dim sS As String
mTime = mTime + 1
mM = Int(mTime / 60)
mS = mTime - mM
sS = mS
sM = mM
If mM < 10 Then sM = "0"  mM
If mS < 10 Then sS = "0"  mS
Label2 = sM  ":"  sS
End Sub
Private Sub OpenBlank(ByVal zmX As Long, ByVal zmY As Long)
Dim Continue As Boolean
Dim mX As Long
Dim mY As Long
OpenFlag = OpenFlag + 1
Do While True
   Continue = False
   For mY = 1 To NowHeight
       For mX = 1 To NowWidth
           If What(mX, mY) = 11 Then
              ''如果存在未判断的空
              Continue = True
              ''把它周围的8个点打开
              ''先打开左面的点
              If mX - 1 >= 1 Then
                 If What(mX - 1, mY) = 0 Then
                    What(mX - 1, mY) = 11
                    Picture1.PaintPicture image1(0).Picture, mX - 2, mY - 1
                    OpenFlag = OpenFlag + 1
                 ElseIf What(mX - 1, mY) >= 1 And What(mX - 1, mY) <= 9 Then
                    Picture1.PaintPicture image1(What(mX - 1, mY)).Picture, mX
- 2, mY - 1
        &n

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号