欢迎来到天天文库
浏览记录
ID:40583123
大小:133.50 KB
页数:13页
时间:2019-08-04
《vb上机设计题答案》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第1题Text1、Text2、Text3Caption清空Alignment1---RightJustifyText3LockedTruePrivateSubCommand1_Click()Text3.Text=Trim(Str(Val(Text1.Text)+Val(Text2.Text)))EndSubPrivateSubCommand2_Click()Text3.Text=""Text2.Text=""Text1.Text=""Text1.SetFocusEndSubPrivateSubForm_Load()Text3.Locked=TrueEndSubPrivateSubText1
2、_KeyPress(KeyAsciiAsInteger)IfKeyAsciiAsc(9)ThenKeyAscii=0EndIfEndSubPrivateSubText2_KeyPress(KeyAsciiAsInteger)IfKeyAsciiAsc(9)ThenKeyAscii=0EndIfEndSub第2题Label1Caption欢迎光临AlignMent2-CenterTimer1Interval200PrivateSubCommand1_Click()IfCommand1.Caption="开始"Th
3、enCommand1.Caption="停止"Timer1.Enabled=TrueElseTimer1.Enabled=FalseCommand1.Caption="开始"EndIfEndSubPrivateSubTimer1_Timer()Label1.FontSize=Label1.FontSize+2EndSub第3题PrivateSubCommand1_Click() IfCommand1.Caption="开始"Then Command1.Caption="停止" Timer1.Enabled=True Else Command1.Caption="开始" Timer1.Ena
4、bled=False EndIf EndSub PrivateSubTimer1_Timer() StaticatAsBoolean IfatThen Label1.ForeColor=RGB(255,0,0) at=Notat Else Label1.ForeColor=RGB(0,0,255) at=Notat EndIf EndSub 第4题Form1Caption字幕滚动MaxButtonFalseMinButtonFalseLabel1Caption祝您考试成功Front宋体、二号、粗体ForeColor选红色Timer1Interval100Command1Caption开始P
5、rivateSubCommand1_Click()IfCommand1.Caption="开始"ThenTimer1.Enabled=TrueElseCommand1.Caption="开始"Timer1.Enabled=FalseEndIfEndSubPrivateSubTimer1_Timer()Label1.Left=Label1.Left+100IfLabel1.Left>Form1.WidthThenCommand1.Caption="停止"Label1.Left=-Label1.WidthEndIfEndSub第5题Form1Caption调色板MinButtonFalseMa
6、xButtonFalseHscroll1Min0Max255Shape1FillStyle0---SolidCommand1Caption应用Label4Caption坚持就是胜利!楷体GB2312字号:二号Aligment2---CenterDimrAsInteger,gAsInteger,bAsIntegerPrivateSubForm_Load()r=HScroll1(0).Valueg=HScroll1(1).Valueb=HScroll1(2).ValueShape1.FillColor=RGB(r,g,b)Label4.ForeColor=RGB(r,g,b)EndSubPri
7、vateSubHScroll1_Change(IndexAsInteger)r=HScroll1(0).Valueg=HScroll1(1).Valueb=HScroll1(2).ValueShape1.FillColor=RGB(r,g,b)EndSubPrivateSubHScroll1_Scroll(IndexAsInteger)CallHScroll1_Change(Index)EndSubPrivateSubC
此文档下载收益归作者所有