Dim save As StringDim a As SingleDim points, over, b, c, d, e As BooleanPrivate Sub Command1_Click(Index As Integer) If over = True ThenText1.Text = ""End IfIf b = True ThenText1.Text = Text1.Text & Trim(Str(Index)) ElseIf c = True ThenText2.Text = Text2.Text & Trim(Str(Index))ElseIf d = True ThenText4.Text = Text4.Text & Trim(Str(Index)) ElseIf e = True ThenText5.Text = Text5.Text & Trim(Str(Index)) End Ifover = FalseEnd SubPrivate Sub Command2_Click()If points = False ThenIf b = True ThenIf Text1.Text = "" ThenText1.Text = 0 & "."points = TrueElseText1.Text = Text1.Text & "."points = TrueEnd IfElseIf c = True ThenIf Text2.Text = "" ThenText2.Text = 0 & "."points = TrueElseText2.Text = Text2.Text & "."points = TrueEnd IfElseIf d = True ThenIf Text4.Text = "" ThenText4.Text = 0 & "."points = TrueElseText4.Text = Text4.Text & "."points = TrueEnd IfElseIf e = True ThenIf Text5.Text = "" ThenText5.Text = 0 & "."points = TrueElseText5.Text = Text5.Text & "."points = TrueEnd IfEnd IfEnd IfEnd SubPrivate Sub Command3_Click()If b = True ThenIf Text1.Text <> "" ThenText1.Text = Left(Text1.Text, Len(Text1.Text) - 1) End IfElseIf c = True ThenIf Text2.Text <> "" ThenText2.Text = Left(Text2.Text, Len(Text2.Text) - 1) End IfElseIf d = True ThenIf Text4.Text <> "" ThenText4.Text = Left(Text4.Text, Len(Text4.Text) - 1) End IfElseIf e = True ThenIf Text5.Text <> "" ThenText5.Text = Left(Text5.Text, Len(Text5.Text) - 1)End IfEnd IfEnd SubPrivate Sub Command4_Click(Index As Integer)Const Pi = 3.1415926Select Case IndexCase 0Text3.Text = Str(V al(Text1.Text) + V al(Text2.Text))Text6.Text = Str(V al(Text4.Text) + V al(Text5.Text))Text7.Text = Sqr(V al((Text4.Text) * V al(Text4.Text)) + (V al(Text1.Text) * V al(Text1.Text)))Text8.Text = Sqr(V al((Text2.Text) * V al(Text2.Text)) + (V al(Text5.Text) * V al(Text5.Text)))Text9.Text = Sqr(V al((Text3.Text) * V al(Text3.Text)) + (V al(Text6.Text) * V al(Text6.Text)))Case 1Text3.Text = Str(V al(Text1.Text) - V al(Text2.Text))Text6.Text = Str(V al(Text4.Text) - V al(Text5.Text))Text7.Text = Sqr(V al((Text4.Text) * V al(Text4.Text)) + (V al(Text1.Text) * V al(Text1.Text)))Text8.Text = Sqr(V al((Text2.Text) * V al(Text2.Text)) + (V al(Text5.Text) * V al(Text5.Text)))Text9.Text = Sqr(V al((Text3.Text) * V al(Text3.Text)) + (V al(Text6.Text) * V al(Text6.Text)))Case 2Text3.Text = Str(V al(Text1.Text) * V al(Text2.Text) - V al(Text4.Text) * V al(Text5.Text))Text6.Text = Str(V al(Text1.Text) * V al(Text5.Text) + V al(Text4.Text) * V al(Text2.Text))Text7.Text = Sqr(V al((Text4.Text) * V al(Text4.Text)) + (V al(Text1.Text) * V al(Text1.Text)))Text8.Text = Sqr(V al((Text2.Text) * V al(Text2.Text)) + (V al(Text5.Text) * V al(Text5.Text)))Text9.Text = Sqr(V al((Text3.Text) * V al(Text3.Text)) + (V al(Text6.Text) * V al(Text6.Text)))Case 3Text3.Text = (V al(Text1.Text) * V al(Text2.Text) + V al(Text4.Text) * V al(Text5.Text)) / (V al(Text2.Text) * V al(Text2.Text) + V al(Text5.Text) * V al(Text5.Text))Text6.Text = (V al(Text4.Text) * V al(Text2.Text) - V al(Text1.Text) * V al(Text5.Text)) / (V al(Text2.Text) * V al(Text2.Text) + V al(Text5.Text) * V al(Text5.Text))Text7.Text = Sqr(V al((Text4.Text) * V al(Text4.Text)) + (V al(Text1.Text) * V al(Text1.Text)))Text8.Text = Sqr(V al((Text2.Text) * V al(Text2.Text)) + (V al(Text5.Text) *V al(Text5.Text)))Text9.Text = Sqr(V al((Text3.Text) * V al(Text3.Text)) + (V al(Text6.Text) * V al(Text6.Text)))End Selectpoints = FalseEnd SubPrivate Sub Command6_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""over = 0points = 0save = 0End SubPrivate Sub Command7_Click()If b = True ThenText1.Text = Str(-V al(Text1.Text))ElseIf c = True ThenText2.Text = Str(-V al(Text2.Text))ElseIf d = True ThenText4.Text = Str(-V al(Text4.Text))ElseIf e = True ThenText5.Text = Str(-V al(Text5.Text))End IfEnd SubPrivate Sub Command8_Click()If Text1.Text = Text2.Text And Text4.Text = Text5.Text ThenText3.Text = "相等"Text6.Text = " "End IfIf Text1.Text <> Text2.Text Or Text4.Text <> Text5.Text ThenText3.Text = "不相等"Text6.Text = " "End IfEnd SubPrivate Sub Form_Load() points = Falseover = Falsec = Falseb = Trued = Falsee = FalseEnd SubPrivate Sub Text1_Click()b = Truec = Falsed = Falsee = FalseEnd SubPrivate Sub Text2_Click() c = Trueb = Falsed = Falsee = FalseEnd SubPrivate Sub Text4_Click() c = Falseb = Falsee = Falsed = TrueEnd SubPrivate Sub Text5_Click() e = Trueb = Falsed = Falsec = FalseEnd SubPrivate Sub 关于_Click() form2.ShowEnd Sub。