資源描述:
《VB程序-編寫-查詢表格.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
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基本額定負(fù)荷/KN極限轉(zhuǎn)速/(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()’確認(rèn)按鈕程序,用于實現(xiàn)程序功能;DimDAsInteger’定義整數(shù)變量D,即軸的直徑D=Text1.Text’輸入軸的直徑IfOPT1.Value=TrueThen’選擇按鈕1被選中時;SelectCaseD’用selectcase語句進(jìn)行查詢;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’結(jié)束select查詢語句;EndIf’結(jié)束if語句;IfOPT2.Value=TrueThen’當(dāng)按鈕2被選中時;SelectCaseDCaseIs=20LBL25.Caption=18000CaseIs=25LBL25.Caption=16000CaseIs=30LBL25.Caption=13000CaseIs=35LBL25.Captio