VB期末考试复习

VB期末考试复习

ID:83465533

大小:2.15 MB

页数:20页

时间:2023-06-28

上传者:灯火阑珊2019
VB期末考试复习_第1页
VB期末考试复习_第2页
VB期末考试复习_第3页
VB期末考试复习_第4页
VB期末考试复习_第5页
VB期末考试复习_第6页
VB期末考试复习_第7页
VB期末考试复习_第8页
VB期末考试复习_第9页
VB期末考试复习_第10页
资源描述:

《VB期末考试复习》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

VBὃ1ஹᑨᑖᦪ(if....endifselectcase)PublicClassFormlPrivateSubButtonlClick)ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs2HandlesButtonl.ClickDimscoreAsInteger'789:;<=>?ᑖᦪḄscore=Integer.Parse)Me.TextBoxl.Text2'E☢GHᑨᑖᦪIfscore>100Orscore<0ThenMessageBox.Show)"OᦔḄᑖᦪ”2ExitSubElselfscore=100ThenMessageBox.Show)"RᑖS"2Elselfscore>=90ThenMessageBox.Show)"UVS”2Elselfscore>=80ThenMessageBox.Show)"XY!”2Elselfscore>=60ThenMessageBox.Show)"\]S"2ElseMessageBox.Show)"^\]S”2EndIfEndSub

1EndClass_`PublicClassFormlPrivateSubButtonlClickByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgsHandlesButtonl.ClickDimscoreAsSingleTry'abcd┯ḄfṹᑏᙠtryḄE☢score=Single.ParseMe.TextBoxl.TextSelectCasescoreCase100MessageBox.Show)"Rᑖ”2Case90To99MessageBox.Show)“UV”2Case80To89MessageBox.Show)"XY”2Case60To79MessageBox.Show)"\]”2Case0To59MessageBox.Show)"^\]"2CaseElseMessageBox.Show)"ᑖᦪOᦔ”2EndSelectCatchexAsException'k⌕ᨵ┯=na┯opqrsdᩭMessageBox.Showex.MessageEndTryEndSubEndClass2ஹfor...nextuvw᪀

2ᐔᡃḄ18-MicrosoftVisualStudioyz{ᦻ9899ᡂQᦪড99IAd«□«CQP.!,*-J=Debuf%K'(1•Lᚆᵪ~ᙳ#M$▼QXF®r«lb=>?•X)*+ᫀ-.᧖ᳮᘤVXᡠᨵVindovs஺569ὡRZUWஹmtJ■Ḅ18jB*ekl«Sy*tMV*tch«rFortColorContr«lT«xtImy□ಘPlowL«youlF*n«l■>ddl«C

3s=s&t&",஻IfiMod6=0Thens=s&Chr(10)EndIfaybb=tNextMsgBox(s)EndSubPrivateSubButtonlClick(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.Click'ᵨᦪᩭ>?ᦾ᜿ᦪDinif(20)AsLongDimiAsInteger'78;

4s&=vbCrLfNextMsgBox(s)EndSubEndClassRḄ¥20-McrosoftVkualStudiog(F)ME)SfflfV)⚗(P)—B)TUJOBS)ᰚ(O)TM(T)SC(W)(OWI23,£X•.TM▼axForml.vtoFormLvbliffit]X▼3XᡠᨵWindowsft0SiᵨjᕒYᐳᣴᵨlḄᩆ20%^_-4MyProject®ButtonnFtxml.vb0CheckBoMMCheckedGstBox”ComboBoxiDat«Tim^>ickerALabelAUnktabel`UstBox/LictViewMasIcedTextBox*MonthCaiendaro)ᐵ+ᫀqr⃩ᳮ■tᵯv&Notifylcon■ft▼9X1NumericUpDownFormlSystem.WindowsJorms.•■PictureBcncwxᔣII.ProgressBar©RacfioButtonRightToleftNo*RightToleftl4—ShowiconTrueAH/⊤▼4xShowfnTaskbTrueb஺0✂de஺4ஹfg1SSize308,304ᦻᑡhSizeGripStyleAutoSUrtPoiitionWindowsD^iFormlTextCᢥᐵ{ḄᦻG.N4fṹ:PublicClassFormlPrivateSubButton!Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.Click'¨9»78ᦪḄ¼·'ᢣ¾¿ᦪE᪗ḄÁ▲Dima(5)AsInteger'789:ᦪa,ᨬᜧE᪗=⊤sbÅ?:ᐗ¡a(0)=10a(l)=20a(2)=30a(3)=40a(4)=50a(5)=60DimiAsIntegerFori=0To5MsgBoxC¨"&i+1&":ᐗ¡Ḅ`”&a(i))NextEndSub

5PrivateSubButton2_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButton2.Click’¨y»78ᦪḄ¼·'^ᢣ¾ᦪE᪗ḄE▲Dima()AsString={஻as஻=஻sf஻=஻fsg஻=஻gge஻}MsgBox(஻ᐗ¡ḄÉÊᓽᐗ¡Ḅ:ᦪ`஻&a.Length)DimiAsIntegerFori=0Toa.Length-1MsgBox(஻¨"&i+1&஻:ᐗ¡Ḅ`஻&a(i))NextEndSubEndClassPublicClassFormlPrivateSubButtonlClick(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.Click'✌ᐜᑨÎÏÐᔲÒᐭIfMe.TextBoxl.Text=""ThenMessageBox.Show(“Ô°ᐭÎÏ”)Me.TextBoxl.Focus()ExitSubEndIf’£EᩭᑨÕṹÐᔲÒᐭIfMe.TextBox2.Text.Length=0ThenMessageBox.Show("Õṹ^c=ÖÒᐭS”)Me.TextBox2.Focus()

6ExitSubEndIf'ᨬ×ᑨØÏÕṹÐᔲᔠ·IfMe.TextBox1.Text="123456"AndMe.TextBox2.Text="123஻ThenMessageBox.Show)"ᔠ·ᵨᡝ"2Else'ᩩÜ^ᡂÝ=᡻¯ElseE☢ḄfṹMessageBox.Show)஻ÎÏᡈÕṹᨵ┯=ÖὶáâᳮᕒS”2EndIfEndSubEndClass3ஹMDIåæḄçᵨ)aèé᱄åæḄIsMdiContainerëឋtrue2íᓫïText`ᵨᩭᢣsíᓫ⚗Ḅ᪗⚪.ñbÅòóᙠ⌕ᵨôõöḄ÷øé9:“&”ᩭᢣ7ôõö.ᡈᙠᐸú°ᐭ“-”ᩭûüíᓫ⚗ᑖᒘþ.Checked`èéíᓫ⚗Ðᔲÿ⌱True⌱J,False⌱.Nameᓫ⚗ḄShortcutKeysᢣ$%ᵫᓫ⚗Ḅ'ᣩ)Enabledᢣ$ᓫ⚗.ᔲ%ᵨVisibleᢣ$ᓫ⚗.ᔲ%3Image:ᓫ⚗789᪗

7;<“>?@ᕒBC”%EFGᑮ>?@ᕒBCIJ./L37¥ᵨ1'MkrowftVr$u*lStudio•ᦻN(F)OE)«BP)Pᡂ(B)RS8®A)162(0)UKT)1sgltg(QWS5(H)ὡ9ḄUVW•XYZᓬ\᰿ᘤI—xll|wi3>,iai@,aAI“MyProject,_•pp.coofig3)formtvbJfrmAddNum.vb`frmBJperlnfo.vbafnnC)hi᪀BCToolStripMenuktem_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)Handles>hi᪀BCToolStripMenuItem.Clickᓫh@ᕒBCToolStripM೐nuktem_Click(ByVaisenderAsSystem.ObjectByVaieAsSystem.EventArgs)Handles>h@ᕒBCzToolStripMenuItem.ClickfrmCKperlnfo.MdiParentMefrmCKperlnfo.Show()

8frmCKperlnfo.Focus()EndSubPrivateSubxy@ᕒBCToolStripMenuktem_Click(ByVaisenderAsSystem.ObjectByVaieAsSystem.EventArgs)Handlesxy@ᕒBCzToolStripMenuItem.ClickfrmBJperlnfo.MdiParent=MefrmBJperInfo.Show()frmBJperlnfo.Focus()EndSubPrivateSub>hYzToolStripMenuktem_Click(ByVaisenderAsSystem.ObjectByVaieAsSystem.EventArgs)Handles>hYzrTooIStripMenuItem.ClickfrmCKnum.MdiParent=MefrmCKnum.Show()frmCKnum.Focus()EndSubPrivateSub{ᦋ}ṹToolStripMenuktem_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)Handles{ᦋ}ṹToolStripMenuItem.ClickfrmXGpassport.MdiParent=MefrmXGpassport.Show()frmXGpassport.Focus()EndSubPrivateSub7~IIYzToolStripMenuktem_Click(ByVaisenderAsSystem.ObjectByVaieAsSystem.EventArgs)Handles7~WYzrToolStripMenuItem.ClickfrmAddNum.MdiParent=MefrmAddNum.Show()frmAddNum.Focus()EndSubPrivateSubMtEToolStripMenuItem_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesiUHiToolStripMenuItem.ClickApplication.Exit()EndSubEndClass4ஹ☢ᔣḄḄᵨᵨ

9fṹPublicClassFormlPrivateSubButtonlClickByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgsHandlesButtonl.Click’ᵨᩭ$vv’$Ḅm᎛ᵨNewᐵ)DimmyCatAsNewCatMsgBox஻¡ᨵ£¡ᨵ¤t¥஻&myCat.catsName’§☢¤t¥’ᐸ©u.ª«¬ឋ"CatName”ᵨ“.¬ឋ”ª«myCat.catsName="°±஻myCat.catsAge=2myCat.catsColur="³⁐"MsgBox"஻&myCat.catsName&஻µ¶“&myCat.catsAge&"·¶஻&஻."&myCat.catsColurEndSubEndClass$fṹPublicClassCat'$¸,privateª«º»PrivateCatNameAsStringPrivateCatAgeAsIntegerPrivateCatColurAsString'$¬ឋ¬ឋ$¼½¸¾¿Ḅ'ᐸÀᵨ¥Á½¸ḄÂᡈ¤¸ÄÂ

10PublicPropertycatsNameOAsStringGetReturnCatNameEndGetSet(ByVaivalueAsString)CatName=valueEndSetEndPropertyPublicPropertycatsAgeOAsIntegerGetReturnCatAgeEndGetSet(ByVaivalueAsInteger)CatAge=valueEndSetEndPropertyPublicPropertycatsColur()AsStringGetReturnCatColurEndGetSet(ByValvalueAsString)CatColur=valueEndSetEndPropertyEndClassÉÊËÌḄ⊤☢μJÎḄḄᵨ

11ᓃ}Ḅ~ᵨ-11080VisualStudio(ᦻ9899ᡂপQᦪড99IAd«□«CQPdDebuf%K'(1•L#M$▼QX᝝⚓ForelvbByCubevbFeralrb[>i+]x)*+ᫀ-.᧖ᳮᘤVXᡠᨵVindovs஺5yZl«Sy*tMV*tch«rRiftToLftL«youtF«ls«ShovlcoaTrv«PlowL«youlF*n«lShovInT*zkb*rTrutvFold«rBrows«rDialoeTextFgtDiklogCDᐵὶḄᦻG.GroupBoxNOᵨ}ḄṹbPublicClassFormlPrivateSubButtonlClick(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.ClickDimcAsNewMyCubec.Length=Double.Parse(Me.TextBoxl.Text)c.Width=Double.Parse(Me.TextBox2.Text)c.Height=Double.Parse(Me.TextBox3.Text)Me.TextBox4.Text=c.tiji()Me.textbox5.text=c.Bmj()EndSubEndClass}ḄṹbPublicClassMyCubePrivateLAsDoublePrivateWAsDoublePrivateHAsDoublePublicPropertyLength()AsDoubleGet

12ReturnLEndGetSet(ByVaivalueAsDouble)L=valueEndSetEndPropertyPublicPropertyWidth()AsDoubleGetReturnWEndGetSet(ByVaivalueAsDouble)W=valueEndSetEndPropertyPublicPropertyHeight()AsDoubleGetReturnWEndGetSet(ByVaivalueAsDouble)H=valueEndSetEndProperty'$ÉÊËÌḄJÎḄPublicFunctiontiji()AsDoubleDimvAsDoub1ev=L*W*11ReturnvEndFunction'$ÉÊËÌ⊤☢ÎḄPublicFunctionBmj()AsDoubleDimsAsDouble=L*W*2+L*H*2+W*H*2sReturnsEndFunctionEndClassØÙᵨᩭÚ¥@BC1ஹ$personPublicClassperson'$Ûᨵ¸PrivatenameAsStringPrivateageAsInteger'᪀⌼ÝÞᦪḄàᦪ

13PublicSubNew()nameá஻°᪍”age=21EndSub’᪀⌼ãᨵÞᦪḄàᦪPublicSubNew(ByVaixAsString,ByVaiyAsInteger)name=xageáyEndSub'ØÙ$funciionᩭÚ¥BCPublicFunctionGetnameOAsStringReturnnameEndFunctionPublicFunctionGetage()AsIntegerReturnageEndFunctionEndClass2ஹᵨḄÙäfṹ:PublicClassFormlPrivateSubButtonl_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.Click'ᵨᨵÞᦪḄ

14DimpAsNewpersonMe.TextBoxl.Text=p.GetnameMe.TextBox2.Text=p.GetageEndSubPrivateSubButton2_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButton2.Click'ᵨÝÞᦪḄDimpAsNewperson("ᜧç"45)Me.TextBoxl.Text=p.GetnameMe.TextBox2.Text=p.GetageEndSubEndClass5ஹ᝞éxᑏëì>í¼îï>íSḄ14-MicrosoftVisualStudio᝕FEasv⚗ᡂBsasA9IM¡Tftsusaawoð23z3J•.FormLvb'FormLvb|i8HrK¬H(X£¤ᐭ®¯b&JPaWòó£¤ᐭ᛻4ᣴ°±²³MyProjectappconfigᓭ¤ᐭ¨©ᙢᙬ:JForml.vb:n%((¼dentDmSeLxsdW´+ᫀµ¶✌¸ᘤ4(¹º»AXButton4System.WindowiJorr•njISISMinimumSiM0.0ModifiersFriendBPadding0.0.0,0RightToLeftNoSSize107.23TabindexTabStopTrueôT”Text▭⊈»ᚁÀÁ%StudentDataSetRecordsBindingSource-iiRecordsTableAdapterTextCDᐵ▷ḄᦻGJ0.03C/S

15PrivateSubFormlLoad(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesMyBase.Load,TODO:`fṹöᦪ÷8øᑮ⊤“StudcntDataSet.Records”஺ú%E᪷÷◤⌕þÿᡈ◀஺Me.RecordsTableAdapter.Fill(Me.StudentDataSet.Records)EndSubPrivateSubButtonl_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.ClickIfMe.TextBoxl.Text.Length=0ThenMsgBox(஻56ᐭ89:஻)EndIfMe.RecordsTableAdapter.FillByName(Me.StudentDataSet.Records,Me.TextBoxl.Text)EndSubPrivateSubButton3_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButton3.Click'ᢥ89?@ABMe.RecordsTableAdapter.FillBylikeName(Me.StudentDataSet.Records,“D+Me.TextBoxl.Text+"%”)EndSubPrivateSubButton4Click(ByValsenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButton4.Click'ᢥJKLᙬNBMe.RecordsTableAdapter.FillByADDr(Me.StudentDataSet.Records,+Me.TextBox3.Text+”D)EndSubPrivateSubButton2_Click(ByValsenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButton2.ClickMe.RecordsTableAdapter.FillByNum(Me.StudentDataSet.Records,Me.TextBox2.Text)EndSubEndClass6ஹ᝞Äᵨvbᑏ²ÁÆᕒḄÇGÈÉ

16ᓝ?(Ì1-τ<-r,^ohVijua^Studio^lᦻÍF)M»E)®BV)⚗(P)ᡂD)m(A)9)TM(T)ᑴ⌚S)■<(W)ttE(C)■(H)--MX'-3□-5©BÐFofmLvb-FonnLvbூi»HTFormi.vb[firtlXÒÓÔᵱ+⃩ᳮ#X4''ÚÖ±'ᙠḄÜ15○¯□tfMyProjtCtឋØ03pdcon6gix|FormLvbTSIForm2.vbÝRepoftl.rdlcIjStudcntmdbÞStud«ntD«uSet-xvdᐺà᝕+ᫀáâ%Xãgqå£▼OxButton1System.Windows.Forr•a9StudentO«t*S«tVR«cord*BindingSourc«R«cordtTabl«Ad«pt»r*xᔣIGJMimmumSixc0,0ModifiersFriendjXmPadding0.0,0.0RightToleftNoQo[jbof.*Po-tin®.SSize75.2Sᦻçèᑡ⚗TablixlexTabStopTrueTagTextBKTsrtCéᐵ®ME:0,«/5•O-OIIQS09txaPublicClassFormlPrivateSubRecordsBindingNavigatorSaveltemClick(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)Me.ValidateOMe.RecordsBindingSource.EndEdit()Me.RecordsTableAdapter.Update(Me.StudentDataSet.Records)EndSubPrivateSubForml_Load(ByValsenderAsSystem.Object,ByVa1eAsSystem.EventArgs)HandlesMyBase.LoadSTODO:UVWṹYᦪ[\]ᑮ⊤“StudentDataSet.Records”`஺abc᪷[◤⌕gᡈ◀஺Me.RecordsTableAdapter.Fill(Me.StudentDataSet.Records)EndSubPrivateSubButtonl_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesButtonl.ClickDimstrAsString=Nothing*str=ijlike*'᝞lmnijopS⊤qrᨵijtuᩩwIfMe.TextBoxl.Text.Length>0Thenstr="ijlike&Me.TextBoxl.Text&z'"EndIf'IfMe.TextBox2.Text.Length>0Then

17str="89like'᮱&Me.TextBox2.Text&'EndIf’᝞lmᐭnij}89opS⊤qU~tuᩩwIfstr<>NothingAndMe.TextBox2.Text.Length>0Then'᝞lstr=nothing,89“u”S89tuᩩwstr=str&"and89like&Me.TextBox2.Text&"%'"'⊤qrmᐭ89,mᐭijElselfMe.TextBox2.Text.Length>0Thenstr=஻89like'%஻&Me.TextBox2.Text&஻"EndIfIfstr<>NothingAndMe.ComboBoxl.Text.Length>0Thenstr=str&"andឋlike'&Me.ComboBoxl.Text&”ElselfMe.ComboBoxl.Text.Length>0Thenstr="ឋlike'&Me.ComboBoxl.Text&"%'஻EndIf'fillerឋuᩩwS᪷[ᩩw⌱mMe.RecordsBindingSource.Filter=strEndSubEndClass7ஹᦻWF)3B(V)JBB(P)—B)ê(D)538(A)ë(O)ᣴ⊤(R)IM(T)ISম®O(W)(C)23*23zíX•îReportLrdlc[ifiit]FormLvbForml.vbFormZvbi^tt*S8ï▼X49ý■5□♦ð5,ᓃStud*ntDat«S«t?■3Records3D-(3Usersñ¯ឋØóôõö÷»ᙬøùEaail=F௃eldslñsFieldsHlSf.Valu=Fூeldslóôõ.Value=Fieldsi¨©»ᙬ.Value=Fieldsøù.Value=Fxeldsúû(ü$ᳮBlNEI▼Qx:IBackQfOund(|)Tran(p«rent13Background!SBorderColorBlackG)BorderStykNoc«SBorderWidthIptColumns1CdumnSpaci1cmSSize4Z66M4CE.Sen-BackgroundcoloreX.9K/S0.03C/50

18ᦻ(F)ME)WB(V)®B(P)-B)a»(D)S3E(A)ë9)IM(T)(S)BO(W)(Oÿஹ*23N1•5FormLvb'FormLvb[ᓝ/FonnXvb|i»i+]▼XGHULI31AfiW15JIMyProjectDapp.configFormLvb33MrmZvbReportl.rdlcJStudentmdbijStudertDataSetJtjdᵨ■■ឋv0XReportVicwtrlMicrosoft.Rep•StudentDat«SetRefig■□(W)?@(஺•»(«)23,3E•.᝞ᜧFormLvbFormLvb|»H|XwJX0JDBTU-12VWX6Y/{0J»MFXidGHIᚪᡃLಘSMMyPrcject4appeonfigJForml.vb"[\L]rcUudeHtDataset-KsdᵨMᐵᫀHPQᘤse▼QxToolStripButton2System.Win•StudentDataSet-rRe

19'TODO:UVWṹYᦪ[\]ᑮ⊤“StudentDataSet.Records”`஺abc᪷[◤⌕gᡈ◀஺Me.RecordsTableAdapter.Fill(Me.StudentDataSet.Records)EndSubPrivateSubRecordsBindingNavigatorSaveItem_Click(ByValsenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesRecordsBindingNavigatorSave11em.ClickMe.ValidateOMe.RecordsBindingSource.EndEdit0Me.RecordsTableAdapter.Update(Me.StudentDataSet.Records)EndSubPrivateSubToolStripButtonl_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesToolStripButtonl.ClickMe.RecordsTableAdapter.FillByTel(Me.StudentDataSet.Records,Me.ToolStripTextBoxl.Text)EndSubPrivateSubToolStripButton2_Click(ByVaisenderAsSystem.Object,ByVaieAsSystem.EventArgs)HandlesToolStripButton2.Click'TODO:UVWṹYᦪ[\]ᑮ⊤“SludenlDataSet.Records”`஺abc᪷[◤⌕gᡈ◀஺Me.RecordsTableAdapter.Fill(Me.StudentDataSet.Records)EndSubEndClass

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
最近更新
更多
大家都在看
近期热门
关闭