


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
20112011 年年 VFPVFP 程序设计参考答案程序设计参考答案 Visual Visual FoxProFoxPro 程序设计程序设计 1 1 1 thisform list1 rowsourcetype 3 thisform list1 rowsource select 姓名 from xsqk thisform list1 listindex 1 locate for 姓名 thisform list1 value thisform refresh 2 locate for 姓名 this value thisform refresh Visual Visual FoxProFoxPro 程序设计程序设计 2 2 1 if thisform Optiongroup1 value da df df 5 endif skip thisform label1 caption 题目 skip thisform Optiongroup1 Option1 caption 题目 skip thisform Optiongroup1 Option2 caption 题目 skip thisform Optiongroup1 Option3 caption 题目 skip thisform Optiongroup1 Option4 caption 题目 skip da val 题目 2 if df 60 messagebox 祝贺您 考试合格 else messagebox 考试不合格 继续努力 endif Visual Visual FoxProFoxPro 程序设计程序设计 3 3 1 locate for 商品名称 thisform text1 value if found thisform label2 caption 品牌 thisform label4 caption str 单价 4 2 mand2 enabled t endif 2 continue if found thisform label2 caption 品牌 thisform label4 caption str 单价 4 2 else messagebox 已没有该品牌的商品 this enabled f endif Visual Visual FoxProFoxPro 程序设计程序设计 4 4 Form1 init public n1 n2 n3 n4 OptionGroup1 Click mand1 enabled t Text3 Lostfocus mand2 enabled t mand2 setfocus Command1 Click a int 100 rand b int 100 rand if a b thisform text1 value a thisform text2 value b else thisform text1 value b thisform text2 value a endif thisform text3 setfocus Command2 Click ch thisform OptionGroup1 value n1 thisform text1 value n2 thisform text2 value n3 val thisform text3 value do case case ch 1 n4 n1 n2 case ch 2 n4 n1 n2 case ch 3 n4 n1 n2 case ch 4 n4 n1 n2 endcase if n4 n3 messagebox 恭喜你答对了 thisform text3 value else messagebox 不正确 再试 thisform text3 value thisform text3 setfocus endif Visual Visual FoxProFoxPro 程序设计程序设计 5 5 1 Use tjd Locate for 书名 VFP 数据库 Dj 单价 Use sdb Locate for 书名 VFP 数据库 Replace 单价 with dj 金额 with 单价 册数 use 2 Text1 的 Lostfocus 事件代码 Use mm Locate for alltrim upper thisform text1 value upper allt rim 用户名 If found Messagebox 该用户名已存在 重新输入 提示 Thisform text1 setfocus Thisform text1 value Else Thisform text2 setfocus Endif Text3 的 Lostfocus 事件代码 b alltrim thisform text2 value c alltrim thisform text3 value if bc messagebox 两次密码不一致 Thisform text2 value Thisform text3 value Thisform text2 setfocus else mand1 enabled t endif 添加 按钮的 Click 事件代码 a alltrim thisform text1 value b alltrim thisform text2 value Append blank Replace 用户名 with a 密码 with b messagebox 你的用户名是 a 你的密码是 b 注册成功 Visual Visual FoxProFoxPro 程序设计程序设计 6 6 1 Skip If eof Messagebox 已到文件末 Go bottom Endif Thisform refresh 2 append append Thisform refresh 3 r messagebox 真的要删除吗 292 删 除记录 If r 6 Delete Pack Endif 4 if nkeycode 13 Locate for this value 学号 If not found Messagebox 未找到 Endif Thisform refresh Endif Visual Visual FoxProFoxPro 程序设计程序设计 7 7 1 Interval 2 Timer1 的 Timer 事件代码 if thisform shape1 topthisform width thisform shape1 width thisform shape1 left 0 else thisform shape1 left thisform shape1 left 1 endif Timer2 的 Timer 事件代码 if thisform shape1 top 0 thisform shape1 top thisform shape1 top 1 else thisform timer2 enabled f thisform timer1 enabled t endif if thisform shape1 left thisform width thisform shape1 width thisform shape1 left 0 thisform shape1 top 0 else thisform shape1 left thisform shape1 left 1 endif Visual Visual FoxProFoxPro 程序设计程序设计 8 8 1 public ct Ct 0 Use YJ Thisform timer1 enabled t Thisform timer1 interval 400 4 if ct 1 skip if eof go top endif thisform label1 caption left 手机号码 9 endif 综合试题 1 1 表单的 Init 事件代码 Thisform timer1 enabled f Thisform timer1 Interval 100 开始 按钮的 Click 事件代码 Thisfor timer1 enabled t 停止 按钮的 Click 事件代码 Thisfor timer1 enabled f timer1 按钮的 Timer 事件代码 Skip If eof Go top Endif Thisform label3 Caption 身份证号 综合试题 2 1 C1 thisform text1 value N1 val thisform text2 value N2 val thisform text3 value N3 val thisform text4 value N4 val thisform text5 value N5 val thisform text6 value Df n1 n2 n3 n4 n5 5 Thisform label1 caption str df 5 2 Ret messagebox 是否保存数据 292 保存 If ret 6 Insert into xs values c1 n1 n2 n3 n4 n5 Endif 清空 按钮的 Click 事件代码是 Thisform setall value textbox Thisform label1 caption 综合试题 3 1 添加 flag f for n 1 to thisform list2 listcount if thisform list1 value thisform list2 list n flag t exit endif endfor if flag f thisform list2 additem thisform list1 value endif 1 thisform list2 removeitem thisform list2 listin dex endif 全部 for n 1 to thisform list1 listcount thisform list2 additem thisform list1 list n endfor val bo1 value Thisform list1 additem 姓名 N n 1 Endif Endscan Thisform text1 v
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 员工工资提成合同协议
- 武汉市合同房补充协议
- 正规服装合作合同协议
- 2025房产如何撰写买卖合同
- 商品共同经营合同协议
- 樱桃产地采购合同协议
- 2025实习劳动合同模板示例
- 死亡赔偿协议书格式
- 2025签订汽车维修合同应注意的事项
- 员工下班后协议书范本
- 2023年广东省初中生物地理学业考试真题集合试卷及答案高清版
- 静脉输液输液反应课件
- 广东省广州市天河区2023年中考二模化学试题(含解析)
- 《动物王国开大会》说课-优质课件
- 病媒生物监测记录表
- 醇的性质高中化学一等奖公开课一等奖省优质课大赛获奖课件
- 电厂烟囱外壁防腐工程项目施工方案
- 《教师职业道德》全书word版
- 唯美复古风人间烟火气相册宣传模板课件
- 合同制消防员绩效考核细则详解
- 门禁一卡通系统解决方案
评论
0/150
提交评论