VF考试表单题

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1一、表单设计。1、shape.scx参考解答:######formForm1Caption=画图######shapeShape1Height=60Width=100Top=30Left=40BorderColor=0,0,255######commandCommand1Caption=画图######commandCommand2Caption=清屏######2、jpb.scx参考解答:######formForm1Caption=奖牌查询######listList1RowSourceType=6RowSource=country.国家名称######optiongroupOptiongroup1ButtonCount=3Option1.Caption=金牌Option2.Caption=银牌Option3.Caption=铜牌######commandCommand1Caption=查询######23、imsh2.scx参考解答:######formForm1Caption=形状图像######labelLabel1FontBold=.T.FontSize=18BackStyle=0Caption=秋天ForeColor=255,255,0######imageImage1Picture=autumn.jpgStretch=2######4、sjrq2.scx参考解答:######formForm1Caption=显示日期时间######pageframePageframe1PageCount=2Page1.Caption=日期Page2.Caption=时间######labellabel1FontItalic=.T.FontSize=14Caption=(DTOC(DATE()))######labellabel2Caption=(TIME())######35、OY2.scx参考解答:######labelLabel1FontName=隶书FontSize=32BackStyle=0Caption=北京欢迎您Left=70Top=24######labelLabel2FontName=隶书FontSize=32BackStyle=0Caption=北京欢迎您Left=73Top=21ForeColor=255,0,0######6、horse.scx参考解答:######formForm1ShowTips=.T.######labelLabel1Caption=你认识吗?AutoSize=.T.FontSize=20######imageImage1Picture=..\..\fjexam95\zebra.bmpBorderColor=255,255,255ToolTipText=斑马######47、Selball2.scx参考解答:######formForm1AutoCenter=.T.Caption=选择######optiongroupOptiongroup1ButtonCount=3Option1.Caption=选1号Option2.Caption=选2号Option3.Caption=选3号Option1.Top=5Option2.Top=5Option3.Top=5######commandgroupCommandgroup1ButtonCount=2Command1.Caption=确定Command2.Caption=取消Command1.Top=5Command2.Top=5######8、dxxz2.scx参考解答:######formForm1Caption=多项选择######checkCheck1Caption=选择1AutoSize=.T.######checkCheck2Caption=选择2AutoSize=.T.######commandgroupCommandgroup1Command1.Caption=确定Command2.Caption=取消######59、combo.scx参考解答:######formForm1Caption=选择######labelLabel1Caption=请选择######comboboxCombo1RowSourceType=1RowSource=VB,VFP,C语言######checkboxCheck1Caption=总成绩######checkboxCheck2Caption=平均成绩######10、edit.scx参考解答:######formForm1Caption=显示######editboxEdit1FontName=楷体_GB2312Alignment=2Value=居中显示######textboxText1Value=(date())FontBold=.T.ForeColor=100,0,100BackColor=200,200,255######6二、表单编程。1、ddcx.scx参考解答:设置对象text1的value属性为“=date()”对象command1(查询按钮)的click事件rq=thisform.text1.valuethisform.grid1.recordsource=sele订单号,签订日期,金额fromorders;where签订日期=rqintocursorlsthisform.refresh2、sjtj.scx参考解答:对象command1(统计按钮)的click事件zl=thisform.combo1.valueselesum(数量),sum(数量*单价)frombook1where种类=zlintoarrayathisform.text1.value=a(1,1)thisform.text2.value=a(1,2)thisform.refresh73、login2.scx参考解答:对象command1(确定按钮)的click事件xh=alltrim(thisform.text1.value)mm=alltrim(thisform.text2.value)sele姓名fromstulogwherealltrim(学号)==xhandalltrim(密码)==mmintocursorlsifreccount()=0thisform.label3.caption=学号或密码不对elsethisform.label3.caption=欢迎+alltrim(姓名)+同学endifthisform.refresh4、adds.scx参考解答:对象command1(计算按钮)的click事件replall金额with单价*数量thisform.refresh对象check1(复选框)的click事件ifthis.value=1thisform.command1.enabled=.t.elsethisform.command1.enabled=.f.endif85、jscx.scx参考解答:设置对象combo1的属性######rowsourcetype=”6-字段”rowsource=”teach1.教师号”######对象combo1的init事件this.listindex=1对象combo1的click事件sele系名fromddm1,teach1whereddm1.系号=teach1.系号and教师号=this.value;intoarrayszthisform.text1.value=sz(1,1)thisform.refresh6、tsxz.scx参考解答:对象optiongroup1的click事件selesum(数量),sum(数量*单价)frombook1where种类=thisform.combo1.valueintoarrayszifthis.value=1thisform.text1.value=sz(1,1)elsethisform.text1.value=sz(1,2)endifthisform.refresh97、ddpx.scx参考解答:对象command1(生成表按钮)的click事件ifthisform.optiongroup1.value=1sele职员号,avg(金额)as平均金额fromordersgroupby职员号;orderby平均金额intotablepx_aelsesele职员号,avg(金额)as平均金额fromordersgroupby职员号;orderby平均金额descintotablepx_bendif8、chadate.scx参考解答:设置对象text1的value属性为“=date()”对象spinner1的upclick事件thisform.text1.value=thisform.text1.value+1thisform.refresh对象spinner1的downclick事件thisform.text1.value=thisform.text1.value-1thisform.refresh109、min.scx参考解答:对象command1(按从小到大排列按钮)的click事件a=thisform.text1.valueb=thisform.text2.valueifabt=aa=bb=tendifthisform.text3.value=athisform.text4.value=b10、calc.scx参考解答:对象command1(计算按钮)的click事件x=thisform.text1.valueifx10y=x/3elseifx20y=2*x+1elsey=3*x-10endifendifthisform.text2.value=y1111、xsys.scx参考解答:对象command1(更新按钮)的click事件r=thisform.spinner1.valueg=thisform.spinner2.valueb=thisform.spinner3.valuethisform.shape1.backcolor=rgb(r,g,b)ifr=255andg=0andb=0thisform.shape1.curvature=0elseifr=0andg=0andb=255thisform.shape1.curvature=99elsethisform.shape1.curvature=1endifendifthisform.refresh12、js.scx参考解答:对象command1(计算按钮)的click事件n=0&&给个数n赋初值s=0&&给和s赋初值***********在两线条间完成其他语句**************fori=0to100ifi%7=0n=n+1s=s+iendifendfor***********************************************thisform.text1.value=nthisform.text2.value=sthisform.refresh1213、addcal.scx参考解答:对象command1(添加并计算按钮)的click事件s=thisform.text1.valuel=str(len(s))thisform.list1.additem(s)thisform.list2.additem(l)thisform.refresh14、SelPag.SCX参考解答:对象page1(天空页)的click事件this.backcolor=rgb(0,0,255)thisform.refresh对象page2(沙漠页)的click事件this.backcolor=rgb(255,255,0)thisform.refresh对象page3(雪原页)的click事件this.backcolor=rgb(255,255,255)thisform.refresh1315、

1 / 15
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功