下载
加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 vb程序设计教程第三版实验E

vb程序设计教程第三版实验E.doc

vb程序设计教程第三版实验E

mao利霞
2017-10-17 0人阅读 举报 0 0 暂无简介

简介:本文档为《vb程序设计教程第三版实验Edoc》,可适用于高等教育领域

vb程序设计教程第三版实验E题PrivateSubFormclick()Dima()AsIntegers=Max=Min=Fori=ToRandomizea(i)=Int(Rnd*)Ifa(i)>MaxThenMax=a(i)Ifa(i)<MinThenMin=a(i)s=sa(i)Printa(i)NextiPrintPrint"Max="Max,"Min="Min,"Avg="sPrintEndSub题PrivateSubFormclick()Dima()a=Array(,,,,,)Fori=LBound(a)ToUBound(a)PrintString(Int(a(i)),"")a(i)PrintNextiEndSub题OptionBaseDima()AsIntegerPrivateSubCommandClick()Fori=ToRandomizea(i)=Int(Rnd*)PicturePrinta(i)PrintIfiMod=ThenPicturePrintNextiEndSubPrivateSubCommandClick()Fori=ToSelectCasea(i)CaseTon=nCaseTob=bCaseToc=cCaseTod=dEndSelectNextiPicturePrint"分数在的人数有"nPicturePrint"分数在的人数有"bPicturePrint"分数在的人数有"cPicturePrint"分数在的人数有"dPicturePrint"分数在的人数有"ndbcEndSubPrivateSubFormclick()Dima()AsIntegerPrintTab()"排序前",Fori=Toa(i)=Int(Rnd*)Printa(i)NextiForn=Tonmax=nForm=nToIfa(m)>a(nmax)Thennmax=mNextmt=a(nmax):a(nmax)=a(n):a(n)=tNextnPrintPrintTab()"排序前",Fori=ToPrinta(i)NextiEndSubPrivateSubFormclick()Dima()AsIntegerPrintTab()"排序前",Fori=Toa(i)=Int(Rnd*)Printa(i)NextiForn=ToStepForm=TonIfa(m)<a(m)Thent=a(m):a(m)=a(m):a(m)=tNextmNextnPrintPrintTab()"排序前",Fori=ToPrinta(i)NextiEndSub题DimA(,),B(,)AsIntegerPrivateSubCommandClick()Fori=ToForj=ToRandomizeA(i,j)=Int(Rnd*)Ifi>=jThenPicturePrintTab(j*)A(i,j)NextjNextiEndSubPrivateSubCommandClick()Fori=ToForj=ToRandomizeB(i,j)=Int(Rnd*)Ifj>=iThenPicturePrintTab(*j)B(i,j)NextjNextiEndSubPrivateSubCommandClick()Fori=ToForj=ToIfi=jThens=sA(i,j):m=mB(i,j)NextjNextiPicturePrint"A数组主对角线元素和为:"sPicturePrint"B数组主对角线元素和为:"mEndSub题PrivateSubPictureClick()Dima()n=Val(Text)ReDima(Ton,Ton)Fori=TonForj=TonIfi=jOrj=Thena(i,j)=Ifi>jAndi>=Andj<>Thena(i,j)=a(i,j)a(i,j)Ifi>=jThenPicturePrintTab(*j)a(i,j)NextjNextiEndSubPrivateSubFormLoad()ListAddItem"Web程序设计"ListAddItem"多媒体技术与应用"ListAddItem"网络技术与应用"ListAddItem"软件技术技术基础"ListAddItem"大学计算机基础"ListAddItem"CC程序设计"ListAddItem"VB程序设计"ListAddItem"数据库技术与应用"ListAddItem"硬件技术基础"EndSubPrivateSubListClick()n=ListListIndexIfListListCount<=ThenListAddItemListList(n)ListRemoveItemnElsei=MsgBox("超过门课不能再选",,"警告")EndIfEndSubPrivateSubListDblClick()n=ListListIndexListAddItemListList(n)ListRemoveItemnEndSubPrivateSubComboKeyPress(KeyAsciiAsInteger)IfKeyAscii=ThenIfNotIsNumeric(ComboText)OrMid(ComboText,,)=""ThenMsgBox("输入的非数字字符请重新输入"):ComboText=""ElseComboAddItemComboText:ComboText=""EndIfEndIfEndSub'PrivateSubComboKeyPress(KeyAsciiAsInteger)'SelectCaseKeyAscii'不能输入小数且不能排除首位数字为的情况且当没有输入数字时按回车键简单组合框中仍会添加空字符串'CaseTo,'CaseElse'KeyAscii='EndSelect'IfKeyAscii=ThenComboAddItemComboText:ComboText=""'EndSubPrivateSubCommandClick()n=ComboListCountimin=imax=nFori=TonIfVal(ComboList(i))<Val(ComboList(imin))Thenimin=iIfVal(ComboList(i))>Val(ComboList(imax))Thenimax=iNextit=ComboList(imin):ComboList(imin)=ComboList():ComboList()=tm=ComboList(imax):ComboList(imax)=ComboList(n):ComboList(n)=mEndSubPrivateSubFormLoad()Dima()a=Array(,,,,,,,)Fori=ToUBound(a)ComboAddItema(i)NextiEndSubPrivateTypeworkmanghAsLongnameAsString*gzAsLongEndTypeDima()AsworkmanDimiPrivateSubCommandClick()Ifi>=ThenMsgBox("最多只能输入个学生的成绩"):TextText="":TextText="":TextText=""TextLocked=True:TextLocked=True:TextLocked=TrueElseIfText=""OrText=""OrText=""Thenn=MsgBox("请认真填写职工的基本信息",,"提示")IfText=""ThenTextSetFocusIfText=""ThenTextSetFocusIfText=""ThenTextSetFocusElseWitha(i)gh=Val(Text)name=Textgz=Val(Text)EndWithText="":Text="":Text=""i=iEndIfEndIfEndSubPrivateSubCommandClick()DimtAsworkmanPictureClsPictureAutoRedraw=TruePicturePrintTab()"工号"Tab()"姓名"Tab()"工资"Forn=Toiimax=nForm=nToiIfa(m)gz>a(imax)gzThenimax=mNextmt=a(n):a(n)=a(imax):a(imax)=tNextnFors=ToiWitha(s)PicturePrintTab()ghTab()nameTab()gzEndWithNextsEndSub

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/14

vb程序设计教程第三版实验E

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利