欢迎来到天天文库
浏览记录
ID:42024431
大小:93.50 KB
页数:11页
时间:2019-09-06
《《vb教学资料》常识》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、制作加法器PrivateSubCommandl_Click()Text3=Val(Textl)+Val(Text2)EndSubPrivateSubCommand2_Click()TextlText2=Text3=,M,Textl.SetFocusEndSubPrivateSubForm_Load()EndSubPrivateSubTextl_KeyPress(KeyAsciiAsInteger)IfKeyAscii<48OrKeyAscii>57ThenKeyAscii=0EndSubPrivateSubText2_KeyPress(KeyAsciiAsIntege
2、r)IfKeyAscii<48OrKeyAscii>57ThenKeyAscii=0EndSub健康称PrivateSubCommandl_Click()DimbzAsIntegerbz=Textl-105IfText2>bz*1.1ThenLabel5.Caption=“偏胖,注意节食”ElseIfText257O
3、rKeyAscii<48ThenKeyAscii=0EndSubPrivateSubText2_Change()IfKeyAscii>57OrKeyAscii<48ThenKeyAscii=0EndSubPrivateSubqd_Click()Timer1.Enabled=TrueEndSubPrivateSubTimerl_Timer()StaticalAsBooleanStaticb1AsBooleanIfShape1.Left>=Form1.ScaleWidth-Shape1.WidthThenal=TrueEndIfIfSh叩el.Left<=0Thenal=
4、FalseEndIfIfalThenShape1.Left=Shape1.Left・100ElseShape1.Left=Shape1.Left+100EndIfIfShape1.Top>=Form1.ScaleHeight-Shape1.HeightThenbl=TrueEndIfIfShape1.Top<=0Thenbl二FalseEndIfIfblThenShapel.Top=Shape1.Top・100ElseShapel.Top=Shapel.Top+100EndIfEndSubPrivateSubtz_Click()Timer1.Enabled=False
5、EndSub密码设置PrivateSubForm_Load()Label2.Left=(Form1.ScaleWidth・Label2.Width)2EndSubPrivateSubLabell_Click()EndSubPrivateSubTextl_KeyPress(KeyAsciiAsInteger)StaticaIfKeyAscii=13ThenIfText1.Text=T234567”ThenLabel2.Caption=”欢迎光临!“Label2.ForeColor=RGB(255,0,0)Text1.Enabled=FalseElseIfa=OThen
6、Label2.Caption="密码不符,请再输入一遍!"Text1.Text=HUTextl.SetFocusa=a+1ElseLabel2.Caption=”非法用户,请退出程序“Textl.Text二””Text1.Enabled=FalseEndIfEndIfEndIfEndSubList2.RemoveitemList2.ListCount・1EndSub偶数迁移Dima(10)PrivateSubCommand1_Click()DimiList1.ClearList2.ClearRandomizeFori=0To9a(i)=Int(Rnd*90+10)Li
7、st1.Additema(i)NextiEndSubPrivateSubCommand2_Click()Dimi,kDoWhilei<=List1.ListCount・1IfVal(Listl.List(i))Mod2=0ThenList2.AdditemListl.List(i)Listl.RemoveltemiElsei=i+1EndIfLoopEndSubPrivateSubCheckl_Click(IndexAsInteger)Text1(Index).Enabled=Check1(Index).ValueIfCheck1(Index)=1T
此文档下载收益归作者所有