vb简单的计算机源代码.doc

上传人:w****2 文档编号:6588829 上传时间:2020-02-29 格式:DOC 页数:9 大小:31.50KB
返回 下载 相关 举报
vb简单的计算机源代码.doc_第1页
第1页 / 共9页
vb简单的计算机源代码.doc_第2页
第2页 / 共9页
vb简单的计算机源代码.doc_第3页
第3页 / 共9页
点击查看更多>>
资源描述
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.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 kuruldiText3.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 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 = Val(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 = Val(Text1.Text)b = Val(Text2.Text)c = a - bText3.Text = cText1.Text = Text2.Text = End IfEnd 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 = Val(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 = 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 = 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.Text = 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 = 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()Form1.Caption = 欢迎使用智能计算器If Text3.Text ThenText1.Text = Text3.TextText2.Text = Text3.Text = ElseForm1.Caption = xataliq kuruldiText3.Text = 没有结果无法继续End IfEnd SubPrivate Sub Text2_Change()End SubPrivate Sub 乘_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 = Val(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 = Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1.Text = Text2.Text = End IfEnd SubPrivate Sub 除_Click()Form1.Caption = 欢迎使用智能计算器If 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 = 运算数值不能为空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.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = 错误Text3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Caption = 错误Text3.Text = 分数的分子不能为零ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d / eText3.Text = fEnd IfEnd SubPrivate Sub munasiwetlik_Click()Form1.Caption = 欢迎使用智能计算器Form1.HideForm3.ShowEnd SubPrivate Sub 继续_Click()Form1.Caption = 欢迎使用智能计算器If Text3.Text ThenText1.Text = Text3.TextText2.Text = Text3.Text = ElseForm1.Caption = xataliqText3.Text = 没有结果无法继续End IfEnd SubPrivate Sub 加_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.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 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 = Val(Text1.Text)e = Val(Text2.Text)f = d + eText3.Text = fEnd IfEnd SubPrivate Sub 减_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 = 错误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 Text2.Text = ThenForm1.Caption = 错误Text3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.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 IfEnd SubPrivate Sub 清空_Click()Form1.Caption = 欢迎使用智能计算器Text1.Text = Text2.Text = Text3.Text = End Sub-form2 ? ? ?Private Sub Command1_Click()Form3.HideForm1.ShowForm1.Text3.Text = End SubPrivate Sub Command2_Click()EndEnd Sub
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 临时分类 > 人文社科


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!