欢迎来到天天文库
浏览记录
ID:57896161
大小:776.00 KB
页数:12页
时间:2020-09-02
《VB程序-编写-查询表格.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ChinaUniversityofGeosciencesCollegeofMechatronicandEngineeringCAD/CAMReportAboutAchievingLookUpFunctionWithVBName:StudentNO.:ExpectScore:96Tips:Generally,duringadesigner’sdesignprocess,whenheneedssomeparametersaboutabearing,hewillspendlotsoftimesearching
2、referencebooks,thusleadtolowefficiency.While,inordertosolvethisproblem,IwriteaprogramwithVisualbasic.ThefinalgoalofthisprogramistoachievethefunctionoflookinguptheparametersofDeepGrooveBallBearing.ThesoftwareIuseisVisualBasic6.0.BelowisthetableIwouldlooku
3、p.ItisatableofstandardparametersofDGBB.轴承型号基本尺寸/mm安装尺寸/mm基本额定负荷/KN极限转速/(r/min)dDBdaminDamaxCrC0r脂润滑油润滑6204204714264112.86.6514000180006205255215314614.07.8812000160006206306216365619.511.59500130006207357217426525.515.2850011000ChinaUniversityofGeoscienc
4、esCollegeofMechatronicandEngineeringCAD/CAM6208408018477329.518.08000100006209458519527831.520.5700090006210509020578335.023.26700850062115510021649143.229.260007500621260110226910147.832.856007000621365120237411157.240.050006300621470125247911660.845.04
5、8006001.Program:PrivateSubCMDCLEAR_Click()‘清除按钮程序;LBL5.Caption=""LBL6.Caption=""LBL14.Caption=""LBL15.Caption=""LBL16.Caption=""LBL17.Caption=""LBL18.Caption=""Text1.Text=""LBL25.Caption=""OPT1.Value=FalseOPT2.Value=Falselbl27.Caption=""EndSubPrivateSubC
6、MDEXIT_Click()’退出按钮程序;EndEndSubPrivateSubCMDOK_Click()’确认按钮程序,用于实现程序功能;DimDAsInteger’定义整数变量D,即轴的直径D=Text1.Text’输入轴的直径IfOPT1.Value=TrueThen’选择按钮1被选中时;SelectCaseD’用selectcase语句进行查询;CaseIs=20ChinaUniversityofGeosciencesCollegeofMechatronicandEngineeringCAD/
7、CAMLBL25.Caption=14000CaseIs=25LBL25.Caption=12000CaseIs=30LBL25.Caption=9500CaseIs=35LBL25.Caption=8500CaseIs=40LBL25.Caption=8000CaseIs=45LBL25.Caption=7000CaseIs=50LBL25.Caption=6700CaseIs=55LBL25.Caption=6000CaseIs=60LBL25.Caption=5600CaseIs=65LBL25.
8、Caption=5000CaseIs=70LBL25.Caption=4800EndSelect’结束select查询语句;EndIf’结束if语句;IfOPT2.Value=TrueThen’当按钮2被选中时;SelectCaseDCaseIs=20LBL25.Caption=18000CaseIs=25LBL25.Caption=16000CaseIs=30LBL25.Caption=13000CaseIs=35LBL25.Captio
此文档下载收益归作者所有