




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
VB制作拼图游戏:简单算法1、首先按照截图把控件添加好!(技巧:处理的图片,划分切块,形成九个小图片,这里采用的是格式,然后采用按钮来显示这些图片,同学们也可以采用,是一样的,重点是鼠标单击事件!注意:添加九个按钮,一定要设置每个按钮的、值来完成对图片的吻合拼接,这样可以使界面看起来美观大方!)、界面的设计这里很多同学习惯更改的值来显示某些文本,但要注意,你这里很可能为了美观会使用自己机子上单独安装的某些字体,这些字体拿到其他机子上是不生效的,那么怎么办呢?这里有个比较“笨拙的方法”你可以利用工具打好想要显示的文本,设置个性字体,然后截图,插入到上面,这样的话,无论是什么字体,都可以显示了,因为图片的属性是无法更改的!这个方法同样可以用来美化!当然了,自己究竟怎么样设计,就靠想象力了,最终得到的效果是要有一个美观、简洁大方的界面!、算法设计(全部代码)Dim Num As IntegerPrivate Sub Command1_Click()If Command2.Picture = Command11.Picture ThenCommand2.Picture = Command1.PictureCommand1.Picture = Command11.PictureEnd IfIf Command4.Picture = Command11.Picture ThenCommand4.Picture = Command1.PictureCommand1.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command11_Click()MsgBox (开发者:孔世明 & vbCrLf & 学院:信息科学与技术学院 & vbCrLf & 专业:软件工程 & vbCrLf & 班级:软件一班 & vbCrLf & 学号:201213040117)End SubPrivate Sub Command12_Click()Num = Num + 1If Num = 1 ThenCommand9.Picture = Command11.PictureEnd IfIf Num = 2 ThenMsgBox (亲不能重复开始哦!)End IfIf Num = 3 ThenMsgBox (亲再说一次,不能重复开始!)End IfIf Num 3 ThenMsgBox (请不要放弃治疗!)End IfEnd SubPrivate Sub Command2_Click()If Command1.Picture = Command11.Picture ThenCommand1.Picture = Command2.PictureCommand2.Picture = Command11.PictureEnd IfIf Command3.Picture = Command11.Picture ThenCommand3.Picture = Command2.PictureCommand2.Picture = Command11.PictureEnd IfIf Command5.Picture = Command11.Picture ThenCommand5.Picture = Command2.PictureCommand2.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command3_Click()If Command2.Picture = Command11.Picture ThenCommand2.Picture = Command3.PictureCommand3.Picture = Command11.PictureEnd IfIf Command6.Picture = Command11.Picture ThenCommand6.Picture = Command3.PictureCommand3.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command4_Click()If Command1.Picture = Command11.Picture ThenCommand1.Picture = Command4.PictureCommand4.Picture = Command11.PictureEnd IfIf Command5.Picture = Command11.Picture ThenCommand5.Picture = Command4.PictureCommand4.Picture = Command11.PictureEnd IfIf Command7.Picture = Command11.Picture ThenCommand7.Picture = Command4.PictureCommand4.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command5_Click()If Command2.Picture = Command11.Picture ThenCommand2.Picture = Command5.PictureCommand5.Picture = Command11.PictureEnd IfIf Command4.Picture = Command11.Picture ThenCommand4.Picture = Command5.PictureCommand5.Picture = Command11.PictureEnd IfIf Command6.Picture = Command11.Picture ThenCommand6.Picture = Command5.PictureCommand5.Picture = Command11.PictureEnd IfIf Command8.Picture = Command11.Picture ThenCommand8.Picture = Command5.PictureCommand5.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command6_Click()If Command3.Picture = Command11.Picture ThenCommand3.Picture = Command6.PictureCommand6.Picture = Command11.PictureEnd IfIf Command5.Picture = Command11.Picture ThenCommand5.Picture = Command6.PictureCommand6.Picture = Command11.PictureEnd IfIf Command9.Picture = Command11.Picture ThenCommand9.Picture = Command6.PictureCommand6.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command7_Click()If Command4.Picture = Command11.Picture ThenCommand4.Picture = Command7.PictureCommand7.Picture = Command11.PictureEnd IfIf Command8.Picture = Command11.Picture ThenCommand8.Picture = Command7.PictureCommand7.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command8_Click()If Command5.Picture = Command11.Picture ThenCommand5.Picture = Command8.PictureCommand8.Picture = Command11.PictureEnd IfIf Command7.Picture = Command11.Picture ThenCommand7.Picture = Command8.PictureCommand8.Picture = Command11.PictureEnd IfIf Command9.Picture = Command11.Picture ThenCommand9.Picture = Command8.PictureCommand8.Picture = Command11.PictureEnd IfEnd SubPrivate Sub Command9_Click()If Command6.Picture = Command11.Picture ThenCommand6.Picture = Command9.PictureCommand9.Picture = Command11.PictureEnd IfIf Command8.Picture = Command11.Picture The
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 天文研究方法与学生创新能力培养-洞察及研究
- 公司股份转让协议15篇
- 浮标集群协同观测-洞察及研究
- 担保服务成本控制-洞察及研究
- 交通安全课观后感合集15篇
- 风险导向的经纪服务提供与绩效优化-洞察及研究
- 睾丸积水表观遗传代谢调控-洞察及研究
- 单细胞转录组变异分析-洞察及研究
- 2025年中国木柄安装锤数据监测报告
- 2025江苏苏州市港航投资发展集团有限公司招聘12人笔试参考题库附带答案详解
- 大学生反诈宣传课件
- 体育行业体育产业园区建设方案
- 2024-2025年历年成人高考民法真题及复习资料
- 幼儿园课程教研活动
- 幼儿烫伤课件教学课件
- 人美版(2024)小学美术一年级上册教学设计(附教材目录)
- 国家职业技术技能标准 6-29-01-01 砌筑工 人社厅发20235号
- 2024-2025学年初中数学八年级上册沪科版(2024)教学设计合集
- 中小学危险化学药品分类
- (完整版)新概念英语第一册单词表(打印版)
- 部编版一年级语文上册全册教案
评论
0/150
提交评论