欢迎来到天天文库
浏览记录
ID:40728673
大小:186.00 KB
页数:24页
时间:2019-08-06
《扫雷程序设计》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、OptionExplicit'标题栏21'确定TOP=70'取消TOP=31'LEFT=123'按钮大小60*24'文本框大小38*18'文本框高度765431'Left=72PrivateSubForm_Load()Text1(0).Text=MHeightText1(1).Text=MWidthText1(2).Text=MinesRemoveMenuLineMe.hWnd,5EndSubPrivateSubOKButton_Click()LetMHeight=Text1(0).TextIfMHeig
2、ht<9ThenLetMHeight=9IfMHeight>24ThenLetMHeight=24LetMWidth=Text1(1).TextIfMWidth<9ThenLetMWidth=9IfMWidth>30ThenLetMWidth=30LetMines=Text1(2).TextIfMines<10ThenLetMines=10IfMines>(MHeight-1)*(MWidth-1)ThenLetMines=(MHeight-1)*(MWidth-1)FrmMain.ClsFrmMain.
3、GameStart'开始UnloadMeEndSubPrivateSubCancelButton_Click()UnloadMeEndSubPrivateSubText1_KeyPress(IndexAsInteger,KeyAsciiAsInteger)If(KeyAscii<48OrKeyAscii>57)AndKeyAscii<>8ThenKeyAscii=0EndSub'PrivateSubHotKey(IndexAsInteger)'Text1(Index).SetFocus'Text1(Ind
4、ex).SelStart=0'Text1(Index).SelLength=Len(Text1(Index).Text)'EndSub''PrivateSubLabel1_Click()'HotKey0'EndSub''PrivateSubLabel2_Click()'HotKey1'EndSub''PrivateSubLabel3_Click()'HotKey2'EndSubOptionExplicitPrivateConstvbGray=&H848284'灰色PrivateConstMLeftAsLo
5、ng=180'雷区距离左侧(按Twips计算)PrivateConstMTopAsLong=825'雷区距离上部PrivateConstWAVE_DEFAULT=432'默认声音PrivateConstWAVE_VICTORY=433'失败声音PrivateConstWAVE_LOST=434'胜利声音PrivateConstBMP_GRID_WIDTH=16'格子的宽PrivateConstBMP_GRID_HEIGHT=16'格子的高PrivateConstBMP_NUM_WIDTH=13'数字的宽P
6、rivateConstBMP_NUM_HEIGHT=23'数字的高PrivateConstBMP_NUM_TOP=16'数字距离上边(菜单底)PrivateConstBMP_NUM_MINE_LEFT=17'计数器距离左侧PrivateConstBMP_NUM_TIME_RIGHT=BMP_NUM_WIDTH*3+20'计时器左侧距离窗体右侧PrivateConstBMP_FACE_WIDTH=24'表情的宽PrivateConstBMP_FACE_HEIGHT=24'表情的高PrivateConstBM
7、P_FACE_TOP=16'表情距离上边(菜单底)PrivateCanPeeperAsBoolean'作弊'初级9/9/10'中级16/16/40'高级30/16/99'PrivateNoMineAsBooleanPrivateSubInithDC()DimIAsLongDimhBmpAsStdPicture'从资源读取游戏图片ForI=0To2'不用PictureBoxSethBmp=LoadResPicture(IIf(MnuCheck(1).Checked,410,411)+I*10,vbResBi
8、tmap)LethBmpDC(I)=CreateCompatibleDC(Me.hdc)CallSelectObject(hBmpDC(I),hBmp.Handle)SethBmp=NothingNextEndSubPublicSubGameStart()'游戏开始'NoMine=FalseLetMe.Width=MLeft+(MWidth*16+8+GetMePixelWidth-Me.ScaleWidth)*Screen.
此文档下载收益归作者所有