欢迎来到天天文库
浏览记录
ID:46682173
大小:145.50 KB
页数:20页
时间:2019-11-26
《vb实验指导答案》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实验一2.PrivateSubCommandl_Click()Label1.ForeColor=vbRedEndSubPrivateSubCommand2_Click()Labell.BackColor=vbBlueEndSubPrivateSubCommand3_Click()Label1.ForeColor=Form1.ForeColorLabel1.BackColor=Forml.BackColorEndSubPrivateSubCommand4_Click()EndEndSub3.PrivateSubCommandl_Click()Text1.FontSiz
2、e=30Command1.Enabled=FalseCommand2.Enabled=TrueConimand3.Enabled=TrueEndSubPrivateSubCommand2_Click()Text1.FontSize=6Command2.Enabled=FalseCommand1.Enabled=TrueCommand3.Enabled=TrueEndSubPrivateSubCommand3_Click()Text1.FontSize=9Command3.Enabled=FalseCommand1.Enabled=TrueComniand2.Enab
3、led=TrueEndSub4.PrivateSubCommandl_Click()a=3」4r=Val(Textl.Text)Text2.Text=2*a*rText3.Text=a*r*rEndSubPrivateSubCommand2_Click()Text1.Text二”“Text2.Text=MUText3.Text=,H,EndSubPrivateSubCommand3_Click()EndEndSub5.PrivateSubCommandl_Click()Label1.BorderStyle=1EndSubPrivateSubCommand2_Clic
4、k()Label1.Left=Label1.Left+200Label1.Top=Label1.Top-150EndSubPrivateSubCommand3_Click()Label1.Visible=FalseEndSubPrivateSubCommand4_Click()Label1.Visible=TrueEndSub6.PrivateSubCommandl_Click()Text2.Text=Textl.SelTextText3.Text=Textl.SelLengthText1.Locked=TrueEndSubPrivateSubCommand2_Cl
5、ick()Textl.Text=Text2.Text=Tcxt3.Tcxt=HUTextl.SetFocusEndSub7.PrivateSubCommandl_Click()Dimr,q,vq=Val(Text2.Text)r=Val(Textl.Text)v=Val(Text3.Text)Label5.Caption=r*60*60+q*60+vEndSubPrivateSubCommand2_Click()Textl.Text=Text2.Text=”“Text3.Text=Textl.SetFocusText2.SetFocusText3.SetFocusE
6、ndSubPrivateSubCommand3_Click()EndEndSubPrivateSubTextl_keypress(keyasciiAsInteger)Ifkeyascii=13ThenText2.SetFocusEndSubPrivateSubText2_keypress(keyasciiAsInteger)Ifkeyascii=13ThenText3.SetFocusEndSub&(1)Dima,v,s,cPrivateSubText1_KeyPress(KeyAsciiAsInteger)a=Val(Text1.Text)IfKeyAscii=1
7、3Thenv=a*a*as=6*a*ac=4*aLabel5.Caption=vLabel6.Caption=sText2.Text=cEndIfEndSub(2)Dima,s,v,cPrivateSubTextl_LostFocus()a=Val(Textl.Text)c=12*av=a*a*as=6*a*ac=Val(Text2.Text)Label5.Caption=vLabel6.Caption=sEndSub(3)Dima,v,s,cPrivateSubTextl_Change()a=Val(Textl.Text)v=a*a*as=6*a*ac=12*
此文档下载收益归作者所有