欢迎来到天天文库
浏览记录
ID:41481893
大小:59.67 KB
页数:7页
时间:2019-08-25
《制作加法器常识》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、制作加法器PrivateSubCommandl_Click()Text3=Val(Textl)+Val(Text2)EndSubPrivateSubCoiwnand2_Click()Textl二“”Text2=Text3=“”Tcxtl.SctFocusEndSubPrivateSubForm_Load()EndSubPrivateSubTextl_KeyPress(KeyAsciiAsInteger)IfKeyAscii<48OrKeyAscii>57ThenKeyAscii=0EndSubPrivateSubText2_KeyPress(
2、KeyAsciiAsInteger)IfKeyAscii<48OrKeyAscii>57ThenKeyAscii=0EndSub健康称PrivateSubCommandl_Click()DimbzAsIntegerbz=Tcxtl-105IfText2>bz*1」ThenLabel5.Caption="偏胖,注意节食"ElseIfText23、sciiAsInteger)IfKeyAscii>57OrKeyAscii<48ThenKeyAscii=0EndSubPrivateSubText2_Change()IfKeyAscii>57OrKeyAscii<48ThenKeyAscii=0EndSubPrivateSubqd_Click()Timer1.Enabled=TrueEndSubPrivateSubTimerl_Timer()StaticalAsBooleanStaticb1AsBooleanIfShape1.Left>=Forml.ScaleWidth・Shape1.Wi4、dthThenal=TrucEndIfIfShape1.Left<=0Thenal=FalseEndIfIfalThenShape1.Left=ShapeI.Left・100ElseShape1.Left=Shape1.Left+100EndIfIfShapeI.Top>=FormI.ScaleHeight・Shape1.HeightThenb1=TrueEndIfIfShape1.Top<=0Thenbl=FalseEndIfIfblThenShapel.Top=Shape1.Top-100ElseShapel.Top=Shapel.Top5、+100EndIfEndSubPrivateSubtz_Click()Timer1.Enabled=FalseEndSub密码设置PrivateSubForm_Load()Label2.Left=(Form1.ScaleWidth・Label2.Width)2EndSubPrivateSubLabell_Click()EndSubPrivateSubTextl_KeyPress(KeyAsciiAsInteger)StaticaIfKeyAscii=13ThenIfText1.Text=”1234567”ThenLabcI2.Caption6、=”欢迎光临!”Labcl2.ForcColor=RGB(255,0,0)Text1.Enabled=FalseElseIfa=()ThenLabel2.Caption="密码不符,请再输入一,遍!"Textl.Text二”“Textl.SetFocusa=a+1ElseLabel2.Caption“非法用户,请退出程序”Text1.Text二”“Text1.Enabled=FalseEndIfEndIfEndIfEndSubList2.RemoveitemList2.ListCount・1EndSub偶数迁移Dima(10)PrivateS7、ubCommand1_Click()DimiList1.ClearList2.ClearRandomizeFori=0To9a(i)=Int(Rnd*90+10)List1.Additema(i)NextiEndSubPrivateSubCoiwnand2_Click()Dimi,kDoWhilei<=List1.ListCount・1IfVal(Listl.List(i))Mod2=0ThenList2.AddltcmListl.List(i)List1.RemoveitemiElsei=i+1EndIfLoopEndSub点餐Privat8、eSubCheck1_Click(IndexAsInteger)TextI(Index).Enabled=Check1(Index).ValueIfCheck1(I
3、sciiAsInteger)IfKeyAscii>57OrKeyAscii<48ThenKeyAscii=0EndSubPrivateSubText2_Change()IfKeyAscii>57OrKeyAscii<48ThenKeyAscii=0EndSubPrivateSubqd_Click()Timer1.Enabled=TrueEndSubPrivateSubTimerl_Timer()StaticalAsBooleanStaticb1AsBooleanIfShape1.Left>=Forml.ScaleWidth・Shape1.Wi
4、dthThenal=TrucEndIfIfShape1.Left<=0Thenal=FalseEndIfIfalThenShape1.Left=ShapeI.Left・100ElseShape1.Left=Shape1.Left+100EndIfIfShapeI.Top>=FormI.ScaleHeight・Shape1.HeightThenb1=TrueEndIfIfShape1.Top<=0Thenbl=FalseEndIfIfblThenShapel.Top=Shape1.Top-100ElseShapel.Top=Shapel.Top
5、+100EndIfEndSubPrivateSubtz_Click()Timer1.Enabled=FalseEndSub密码设置PrivateSubForm_Load()Label2.Left=(Form1.ScaleWidth・Label2.Width)2EndSubPrivateSubLabell_Click()EndSubPrivateSubTextl_KeyPress(KeyAsciiAsInteger)StaticaIfKeyAscii=13ThenIfText1.Text=”1234567”ThenLabcI2.Caption
6、=”欢迎光临!”Labcl2.ForcColor=RGB(255,0,0)Text1.Enabled=FalseElseIfa=()ThenLabel2.Caption="密码不符,请再输入一,遍!"Textl.Text二”“Textl.SetFocusa=a+1ElseLabel2.Caption“非法用户,请退出程序”Text1.Text二”“Text1.Enabled=FalseEndIfEndIfEndIfEndSubList2.RemoveitemList2.ListCount・1EndSub偶数迁移Dima(10)PrivateS
7、ubCommand1_Click()DimiList1.ClearList2.ClearRandomizeFori=0To9a(i)=Int(Rnd*90+10)List1.Additema(i)NextiEndSubPrivateSubCoiwnand2_Click()Dimi,kDoWhilei<=List1.ListCount・1IfVal(Listl.List(i))Mod2=0ThenList2.AddltcmListl.List(i)List1.RemoveitemiElsei=i+1EndIfLoopEndSub点餐Privat
8、eSubCheck1_Click(IndexAsInteger)TextI(Index).Enabled=Check1(Index).ValueIfCheck1(I
此文档下载收益归作者所有