1.PrivateSubForm_Click()label2.Caption=Year(Date)label4.Caption=Month(Date)label6.Caption=Day(Date)label8.Caption=Weekday(Date)-1label11.Caption=TimeEndSub2.DimnumAsDoublePrivateSubCommand1_Click()Label3.Caption=Command1.Caption&函数的计算结果为Label2.Caption=Abs(num)Text1.SetFocusText1.SelStart=0Text1.SelLength=Len(Text1.Text)EndSubPrivateSubCommand2_Click()Label3.Caption=Command2.Caption&函数的计算结果为Label2.Caption=Sqr(num)Text1.SetFocusText1.SelStart=0Text1.SelLength=Len(Text1.Text)EndSubPrivateSubCommand3_Click()Label3.Caption=Command3.Caption&函数的计算结果为Label2.Caption=Fix(num)Text1.SetFocusText1.SelStart=0Text1.SelLength=Len(Text1.Text)EndSubPrivateSubCommand4_Click()Label3.Caption=Command4.Caption&函数的计算结果为Label2.Caption=Int(num)Text1.SetFocusText1.SelStart=0Text1.SelLength=Len(Text1.Text)EndSubPrivateSubCommand5_Click()Label3.Caption=Command5.Caption&函数的计算结果为Label2.Caption=Log(num)Text1.SetFocusText1.SelStart=0Text1.SelLength=Len(Text1.Text)EndSubPrivateSubText1_Change()num=Val(Text1.Text)EndSub3.DimIAsIntegerPrivateSubCommand1_Click()kl=UCase(Trim(Text1.Text))Ifkl=ABCDThenI=0Form2.ShowElseIfI=2ThenMsgBox对不起,您不能使用本系统EndElseForm1.Caption=口令错,请重新输入!I=I+1Text1.SetFocusText1.SelStart=0Text1.SelLength=Len(Text1.Text)EndIfEndIfEndSubPrivateSubText1_Change()Form1.Caption=EndSubPrivateSubText1_KeyUp(KeyCodeAsInteger,ShiftAsInteger)IfKeyCode=13Thenkl=UCase(Trim(Text1.Text))Ifkl=ABCDThenI=0Form2.ShowElseIfI=2ThenMsgBox对不起,您不能使用本系统EndElseForm1.Caption=口令错,请重新输入I=I+1Text1.SelStart=0Text1.SelLength=Len(Text1.Text)EndIfEndIfEndIfEndSub4.PrivateSubCommand1_Click()text4.Text=Val(Text1.Text)*Val(Text2.Text)*Val(Text3.Text)EndSubPrivateSubCommand2_Click()text4.Text=Text3.SetFocusText3.SelStart=0Text3.SelLength=Len(Text3.Text)EndSubPrivateSubCommand3_Click()EndEndSub5.PrivateSubCommand1_Click()Picture1.Clsxh=Text1.Textcj=Val(Text2.Text)SelectCasecjCaseIs=90py=优秀CaseIs=80py=良好CaseIs=70py=中等CaseIs=60py=及格CaseIs=0py=不及格EndSelectPicture1.PrintPicture1.Print学号:;xhPicture1.PrintPicture1.Print分数:;cj;pyEndSub6.PrivateSubCommand1_Click()a=Val(Text1.Text)b=Val(Text2.Text)c=Val(Text3.Text)Max=aMin=aIfMaxbThenMax=bEndIfIfMaxcThenMax=cEndIfIfMinbThenMin=bEndIfIfMincThenMin=cEndIfText4.Text=MaxText5.Text=MinEndSub7.PrivateSubCommand1_Click()RandomizeText2.Text=Int(Rnd*101)Text3.Text=Int(Rnd*101)Text4.Text=EndSubPrivateSubCommand2_Click()Label2.Caption=Text1.TextIfLabel2.Caption=+ThenText4.Text=Val(Text2.Text)+Val(Text3.Text)ElseIfLabel2.Caption=-ThenText4.Text=Val(Text2.Text)-Val(Text3.Text)ElseIfLabel2.Caption=*ThenText4.Text=Val(Text2.Text)*Val(Text3.Text)ElseIfLabel2.Caption=/ThenText4.Text=Val(Text2.Text)/Val(Text3.Text)ElseMsgBox运算类型错,请重输,,警告Text1.SetFocus:Text1.SelStart=0Text1.SelLength=Len(Text1.Text)EndIfEndSub8.PrivateSubCommand1_Click()Constpi=3.14159r=Val(Text1.Text)s=pi*r^2c=2*pi*rText2.Text=Format(s,0.00)Text3.Text=Format(c,0.00)EndSub9.PrivateSubCommand1_Click()a=Val(Text1.Text)b=Val(Text2.Text)c=Val(Text3.Text)p=(a+b+c)/2Ifa+bcAnda+cbAndb+caThens=Sqr(p*(p-a)*(p-c)*(p-b))Text4.Text=Format(s,0.00000)ElseText4.Text=FalseEndIfEndSub10.PrivateSubCommand1_Click()Picture1.Visible=TrueCommand1.Enabled=FalseCommand2.Enabled=TrueEndSubPrivateSubCommand2_Click()Picture1.Visible=FalseCommand1.Enabled=TrueCommand2.Enabled=FalseEndSub11.PrivateSubCommand1_Click()Fori=100To999a=iMod10b=i\10Mod10c=i\100Ifi=a^3+b^3+c^3ThenT1=T1&i&vbCrLfEndIfNextiEndSub12.PrivateSubCommand1_Click()a=0b=1s=a+bT1=a&vbCrLf&bFori=3To30c=a+bIfc=1000ThenExitForEndIfT1=T1&c&vbCrLfs=s+ca=bb=cNextiText2=sEndSub13.PrivateSubCommand1_Click()Fori=1To100s=s+i^2NextiLabel1.Caption=sEndSubPrivateSubCommand2_Click()n=Val(InputBox(请输入N))Fori=1Tons=s+(-1)^(i+1)*(2*i-1)NextiLabel2.Caption=sEndSub14.PrivateSubCommand1_Click()s=Text1n=Len(s)s1=Fori=1Tons1=Mid(s,i,1)&s1NextiText2=s1EndSub15.'将鼠标选中的单词首字母大写PrivateSubCommand1_Click()Text1.SelText=UCase(Left(Text1.SelText,1))&_Right(Text1.SelText,Len(Text1.SelText)-1)EndSub'将鼠标选中的单词全部改为小写PrivateSubCommand2_Click()Text1.SelText=LCase(Text1.SelText)EndSub'输入新单词,添加到文本框尾部PrivateSubCommand3_Click()DimwordAsStringword=InputBox(请输入新单词)Text1.Text=Text1.Text&word&vbCrLfEndSub'删除选中的单词PrivateSubCommand4_Click()Text1.Text=Left(Text1.Text,Text1.SelStart)&_Right(Text1.Text,Len(Text1.Text)-_Text1.SelStart-Text1.SelLength-2)EndSub16.PrivateSubCommand1_Click()Picture1.Clsn=Val(Text1)s1=0Fori=1Tons1=s1+(-1)^(i+1)/(2*i-1)NextiPicture1.Prints1EndSubPrivateSubCommand2_Click()Picture2.Clsn=Val(Text1)s2=0Fori=1Tons2=s2+1/(i*(i+1))NextiPicture2.Prints2EndSub17.Functionjc(n%)AsLongf=1Fori=1Tonf=f*iNextijc=fEndFunctionPrivateSubCommand1_Click()DimnAsIntegern=Val(Text1)Text2=jc(n)EndSubPrivateSubCommand2_Click()DimnAsInteger,iAsIntegern=Val(Text1)Fori=1TonSum=Sum+jc(i)NextiText3.Text=SumEndSub18.PrivateSubCommand1_Click()Form1.ClsFori=1To6PrintTab(20-i);Forj=1To6Print*;NextjPrintTab(24+i);Forj=1To6Print*;NextjPrintNextiEndSubPrivateSubCommand2_Click()Form1.ClsFori=1To6PrintTab(20-i);Forj=1To6PrintChr(64+i);NextjPrintTab(24+i);Forj=1To6PrintChr(64+i);NextjP