已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025电厂个人年终工作总结(4篇)
- 2025年信用社后勤部门年终总结
- 2025国家法官学院招聘拟聘用人员笔试历年参考题库及答案
- 2025租赁合同书样本范文
- 2025店面租赁合同协议书范本
- 2025年下半年喀什地区行署机关事业单位公开遴选易考易错模拟试题(共500题)试卷后附参考答案
- 2025年下半年唐山市迁安市招考投融资高端人才易考易错模拟试题(共500题)试卷后附参考答案
- 2025年云南省化肥买卖合同书
- 2025年下半年周口港口物流产业集聚区城市管理员招考易考易错模拟试题(共500题)试卷后附参考答案
- 2025年下半年吉林长春公主岭市事业单位招聘工作人员5人(6号)易考易错模拟试题(共500题)试卷后附参考答案
- 村干部考入事业编面试真题(含答案)
- 西南交通大学2025年秋季管理岗位与其他专技岗位公开招聘考试参考试题及答案解析
- 2025年陕西省招聘村居后备干部考试应知应会题库及答案
- 公司无人机驾驶员适应性考核试卷及答案
- 市政道路排水系统维护保养技术方案
- 两委换届知识培训材料课件
- 2025广州铁路局集团有限公司招聘笔试考点考试题库和答案
- 2026届广东省珠海市文园中学七年级数学第一学期期末经典试题含解析
- 2025年中国拍立得行业市场全景分析及前景机遇研判报告
- 【生物】2025-2026学年人教版八年级生物上册期中考试复习测评试卷
- JJF(苏) 149-2024 黑体辐射源校准规范
评论
0/150
提交评论