欢迎来到天天文库
浏览记录
ID:30920000
大小:142.44 KB
页数:19页
时间:2019-01-04
《程序设计基础答案》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、程序设计基础答案ProblemsetsChapter1theVisualBasic6.0programmingoverviewOne,thequestionSquarerootof2.Thesamekindofcontrols(liketwolabels)overlap,andwhendesigned,youcansetthe"before"and"after"properties・5.4.)x6.)7.X8.Tick9.)10.X11.Tick12.SquarerootIt'sthesquarerootofthesquarerootofthesq
2、uarerootofthesquarerootof18.2ChoicequestionA.b.b.c.c.d.c.d.d.3,fillintheblanksObject,event2.Properties,methods,events3.Control,Screen(Screen)Object4.5.TheLeftandTop6.Attribute,object・=>3、omaticexecutionisalsolisted)10.ActivateandDeactivateFour,programmingproblemsProgram1.Theinterfacedesignisshowninfigure10~l,10~2,andtable10T.Table10-1instance2mainpropertySettingsforeachcontrolcontrolsProperties(attributevalues)Properties(attributevalues)Labelcontrols1TheName(L4、abel1)Caption(“myfirstVBprogram“)Labelcontrols2TheName(Label2)Caption(“pleaseenteryourname“)FontUnderLine(True)Fontltalic(True)Acommandbutton1TheName(Command1)Caption(“confirmation(&o)“)Acommandbutton2TheName(Coininand2)TheCaption(“endof&x“)Theprocessdesignisasfollows:Privates5、ubForm_Click()Command2.enabled二FalseEenSubPrivateSubCommandlClick()Labe12.Visible二FalseLabel1.Caption二Textl・Text+〃:welcometouse"+Label1Text1.Visible二FalseCommandl.enabled二False:command2.enabled二TrueEndSubPrivateSubCommand2_Click()TheEndEndSubProgram2.Theinterfacedesignisslight6、ly,theprocessdesignisasfollows:ThePrivateSubCommandl_Click()'fontgetslargerForm1.FontSize二form1.fontsize+3Cis:Print"welcometoVB〃EndSubThePrivateSubCommand2_Click()'fontgetssmallerForm1.FontSize二Form1.FontSize一3Cis:Print"welcometoVB〃EndSubThePrivateSubCommand3Click()'fontisbold7、Form1.FontBold=TrueCis:Print"welcometoVB〃EndSubPrivateSubCominand4_Click()'fontisnotboldForm1.FontBold二FalseCis:Print"welcometoVB〃EndSubAtruntime,itisnotpossibletoclickthe"fontsize"buttoninarow,becausewhentheFontSizeattributevalueislessthan0,itwillcauseatimelyerror・Program3.In8、terfacedesignslightly,theprocessdesignisasfollows(formHeightv
3、omaticexecutionisalsolisted)10.ActivateandDeactivateFour,programmingproblemsProgram1.Theinterfacedesignisshowninfigure10~l,10~2,andtable10T.Table10-1instance2mainpropertySettingsforeachcontrolcontrolsProperties(attributevalues)Properties(attributevalues)Labelcontrols1TheName(L
4、abel1)Caption(“myfirstVBprogram“)Labelcontrols2TheName(Label2)Caption(“pleaseenteryourname“)FontUnderLine(True)Fontltalic(True)Acommandbutton1TheName(Command1)Caption(“confirmation(&o)“)Acommandbutton2TheName(Coininand2)TheCaption(“endof&x“)Theprocessdesignisasfollows:Privates
5、ubForm_Click()Command2.enabled二FalseEenSubPrivateSubCommandlClick()Labe12.Visible二FalseLabel1.Caption二Textl・Text+〃:welcometouse"+Label1Text1.Visible二FalseCommandl.enabled二False:command2.enabled二TrueEndSubPrivateSubCommand2_Click()TheEndEndSubProgram2.Theinterfacedesignisslight
6、ly,theprocessdesignisasfollows:ThePrivateSubCommandl_Click()'fontgetslargerForm1.FontSize二form1.fontsize+3Cis:Print"welcometoVB〃EndSubThePrivateSubCommand2_Click()'fontgetssmallerForm1.FontSize二Form1.FontSize一3Cis:Print"welcometoVB〃EndSubThePrivateSubCommand3Click()'fontisbold
7、Form1.FontBold=TrueCis:Print"welcometoVB〃EndSubPrivateSubCominand4_Click()'fontisnotboldForm1.FontBold二FalseCis:Print"welcometoVB〃EndSubAtruntime,itisnotpossibletoclickthe"fontsize"buttoninarow,becausewhentheFontSizeattributevalueislessthan0,itwillcauseatimelyerror・Program3.In
8、terfacedesignslightly,theprocessdesignisasfollows(formHeightv
此文档下载收益归作者所有