vb简单的计算机源代码.doc
《vb简单的计算机源代码.doc》由会员分享,可在线阅读,更多相关《vb简单的计算机源代码.doc(9页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、vb简单的计算机源代码.txt如果青春的时光在闲散中度过,那么回忆岁月将是一场凄凉的悲剧。杂草多的地方庄稼少,空话多的地方智慧少。即使路上没有花朵,我仍可以欣赏荒芜。Private Sub Command1_Click()Form1.Caption = 欢迎使用智能计算器 载入默认正常显示If Check1.Value = 0 Then 1类分歧ElseIf Text1.Text = Or Text2.Text = Then 2类分歧Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2
2、.Text = Then 2类分歧Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空Else 2类分歧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 Then 1类分歧ElseIf Text1.Text = Or Text2.Text = Then 2类分歧Form1.Caption = xataliq kuruldiTex
3、t3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = Then 2类分歧Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空Else 2类分歧Dim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d + eText3.Text = fEnd IfEnd SubPrivate Sub Command2_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 1 ThenEls
4、eIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = 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 ThenEl
5、seIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = 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 I
6、fEnd SubPrivate Sub Command3_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 1 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim d, e, f As Doubled = V
7、al(Text1.Text)e = Val(Text2.Text)f = d * eText3.Text = fEnd IfIf Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim a, b, c As Doublea =
8、Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1.Text = Text2.Text = End IfEnd SubPrivate Sub Command4_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text
9、= ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Caption = 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.Tex
10、t = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Caption = 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 Command5_Click()Form1.Caption = 欢迎使用智能计算器Text1.Text = Text2.Text = Text3.Text = End SubPrivate Sub Command6_Click()Form1.Caption = 欢迎使用智能计算器Form1.HideForm3.ShowEnd SubPrivate Sub Command7_Click()EndEnd SubPrivate Sub Command8_Click()For
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- vb 简单 计算机 源代码
限制150内