1、vb简单的计算机源代码vb简单的计算机源代码.txt如果XX的时光在闲散中度过,那 么回忆岁月将是一场凄凉的悲剧。杂草多的地方庄稼少,空话 多的地方XX少。即使路上没有花朵,我仍可以欣赏荒芜。Private Sub Comma nd1_Click()Forml.Caption =欢迎使用智能计算器载入默认正常显示If Check1.Value = 0 The n1 类分歧Elself Text1.Text = Or Text2.Text = The n契分歧Form1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text
2、= And Text2.Text = The n2类分歧Form1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空Else2类分歧Dim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a + bText3.Text = cText1.Text =Text2.Text =End IfIf Check1.Value = 1 The n1 类分歧Elself Textl.Text = Or Text2.Text = The n契分歧Forml.Captio n 二xataliq kur
3、uldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The n2类分歧Form1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空Else2类分歧Dim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d + eText3.Text = fEnd IfEnd SubPrivate Sub Comma nd2_Click()Form1.Caption =欢迎使用智能计算器”If Check1.Value = 1 Th
4、enElseIf Text1.Text = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d - eText3.Text = fEnd IfIf Check1.Value = 0 T
5、henElseIf Text1.Text = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a - bText3.Text = cTextl.Text =Text2.Text =En
6、d IfEnd SubPrivate Sub Comma nd3_Click()Forml.Caption =欢迎使用智能计算器”If Check1.Value = 1 ThenElseIf Text1.Text = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim d, e, f As Doubled
7、 = Val(Text1.Text)e = Val(Text2.Text)f = d * eText3.Text = fEnd IfIf Checkl.Value = 0 ThenElself Textl.Text = Or Text2.Text = The nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim a, b, c As Double
8、a = Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cTextl.Text =Text2.Text =End IfEnd SubPrivate Sub Comma nd4_Click()Forml.Caption =欢迎使用智能计算器”If Checkl.Value = 0 ThenElself Textl.Text = Or Text2.Text = The nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空Elself Textl.Text = And Text2.Te
9、xt = The nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Val(Text2.Text) = 0 The nForm1.Captio n 二xataliq kuruldiText3.Text =分数的分子不能为零ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a / bText3.Text = cText1.Text =Text2.Text =End IfIf Check1.Value = 1 ThenElseIf Text1.Te
10、xt = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空Elself Textl.Text = And Text2.Text = The nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Val(Text2.Text) = 0 The nForm1.Captio n 二xataliq kuruldiText3.Text =分数的分子不能为零ElseDim d, e, f As Doubled = Val(Text1.Text)e
11、= Val(Text2.Text)f = d / eText3.Text = fEnd IfEnd SubPrivate Sub Comma nd5_Click()Form1.Caption =欢迎使用智能计算器Text1.Text =Text2.Text =Text3.Text =End SubPrivate Sub Comma nd6_Click()Forml.Caption =欢迎使用智能计算器Forml.HideForm3.ShowEnd SubPrivate Sub Comma nd7_Click()EndEnd SubPrivate Sub Comma nd8_Click()For
12、m1.Caption =欢迎使用智能计算器If Text3.Text The nText1.Text = Text3.TextText2.Text =Text3.Text =ElseForm1.Captio n 二xataliq kuruldiText3.Text =,没有结果无法继续End IfEnd SubPrivate Sub Text2_Cha nge()End SubPrivate Sub 乘 _Click()Forml.Caption =欢迎使用智能计算器”If Checkl.Value = 1 ThenElself Textl.Text = Or Text2.Text = The
13、 nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d * eText3.Text = fEnd IfIf Checkl.Value = 0 ThenElself Textl.Text = Or Text2.Text = Th
14、e nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空Elself Textl.Text = And Text2.Text = The nForml.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim a, b, c As Doublea = Val(Textl.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1.Text =Text2.Text =End IfEnd SubPrivate Sub 除 _Click()Form1.Ca
15、ption =欢迎使用智能计算器”If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Val(Text2.Text) = 0 The nForml.Captio n 二xataliq kuruldiText3.Text
16、=分数的分子不能为零ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a / bText3.Text = cText1.Text =Text2.Text =End IfIf Check1.Value = 1 ThenElseIf Text1.Text = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Caption =错
17、误Text3.Text =运算数值不能为空ElseIf Val(Text2.Text) = 0 The nForm1.Caption =错误Text3.Text =分数的分子不能为零ElseDim d, e, f As Doubled = Val(Textl.Text)e = Val(Text2.Text)f = d / eText3.Text = fEnd IfEnd SubPrivate Sub mun asiwetlik_Click()Form1.Caption =欢迎使用智能计算器Form1.HideForm3.ShowEnd SubPrivate Sub 继续 _Click()For
18、m1.Caption =欢迎使用智能计算器If Text3.Text The nText1.Text = Text3.TextText2.Text =Text3.Text =ElseForm1.Capti on 二xataliqText3.Text =没有结果无法继续End IfEnd SubPrivate Sub 加 _Click()Forml.Caption =欢迎使用智能计算器”If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text
19、 =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Caption =错误”Text3.Text =运算数值不能为空ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a + bText3.Text = cText1.Text =Text2.Text =End IfIf Checkl.Value = 1 ThenElself Textl.Text = Or Text2.Text = The nForml.Captio n 二xataliq kurul
20、diText3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d + eText3.Text = fEnd IfEnd SubPrivate Sub 减 _Click()Form1.Caption =欢迎使用智能计算器”If Check1.Value = 1 ThenElseIf Text1.Te
21、xt = Or Text2.Text = The nForm1.Captio n 二xataliq kuruldiText3.Text =运算数值不能为空Elself Textl.Text = And Text2.Text = The nForml.Caption =错误”Text3.Text =运算数值不能为空ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d - eText3.Text = fEnd IfIf Check1.Value = 0 ThenElseIf Text1.Text = Or Text
22、2.Text = The nForm1.Caption =错误”Text3.Text =运算数值不能为空ElseIf Text1.Text = And Text2.Text = The nForm1.Caption =错误”Text3.Text =运算数值不能为空ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a - bText3.Text = cTextl.Text =Text2.Text =End IfEnd SubPrivate Sub 清空 _Click()Forml.Caption =欢迎使用智能计算器Text1.Text =Text2.Text =Text3.Text =End Subform2Private Sub Comma nd1_Click()Form3.HideForm1.ShowForm1.Text3.Text =End SubPrivate Sub Comma nd2_Click()EndEnd Sub
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1