版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、vb 简单的计算机源代码 .txt 如果青春的时光在闲散中度过, 那么回忆岁月将是一场凄凉的悲 剧。杂草多的地方庄稼少,空话多的地方智慧少。即使路上没有花朵,我仍可以欣赏荒芜。 Private Sub Command1_Click()Form1.Caption =" 欢迎使用智能计算器 " '载入默认正常显示If Check1.Value ="0" Then '1类分歧ElseIf Text1.Text= "" Or Text2.Text = "" Then'2类分歧Form1.Captio
2、n ="xataliq kuruldi"Text3.Text = "运算数值不能为空 "ElseIf Text1.Text= "" And Text2.Text = "" Then'2类分歧Form1.Caption ="xataliq kuruldi"Text3.Text = "运算数值不能为空 "Else'2类分歧Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Text) c = a + b
3、Text3.Text = c Text1.Text = "" Text2.Text = ""End IfIf Check1.Value = "1" Then'1类分歧ElseIf Text1.Text= "" Or Text2.Text ="" Then '2类分歧Form1.Caption ="xataliq kuruldi"Text3.Text = "运算数值不能为空IIElseIf Text1.Text= "" And Te
4、xt2.Text= "" Then'2类分歧Form1.Caption ="xataliq kuruldi"Text3.Text = "运算数值不能为空IIElse'2类分歧Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text)f = d + eText3.Text = fEnd IfEnd SubPrivate Sub Command2_Click()Form1.Caption = " 欢迎使用智能计算器 " If Check1.Value
5、 = "1" ThenElseIf Text1.Text = "" Or Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不
6、能为空 "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 = "" Then Form1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text
7、 = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"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 Command3_Cl
8、ick() Form1.Caption = " 欢迎使用智能计算器 "If Check1.Value = "1" ThenElseIf Text1.Text = "" Or Text2.Text = "" Then Form1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = "" And Text2.Text = "" ThenForm1.C
9、aption = "xataliq kuruldi"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 = "" Then Form1.Caption = "xataliq kuru
10、ldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1.Text = ""
11、Text2.Text = ""End IfEnd SubPrivate Sub Command4_Click() Form1.Caption = " 欢迎使用智能计算器 "If Check1.Value = "0" ThenElseIf Text1.Text = "" Or Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.T
12、ext = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Val(Text2.Text) = "0" Then Form1.Caption = "xataliq kuruldi"Text3.Text = " 分数的分子不能为零 "ElseDim a, b, c As Doublea = Val(Text1.Text)b
13、= Val(Text2.Text)c = a / bText3.Text = cText1.Text = ""Text2.Text = ""End IfIf Check1.Value = "1" ThenElseIf Text1.Text = "" Or Text2.Text = "" Then Form1.Caption = "xataliq kuruldi" Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = &q
14、uot;" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空ElseIf Val(Text2.Text) = "0" ThenForm1.Caption = "xataliq kuruldi" Text3.Text = " 分数的分子不能为零 ElseDim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f
15、 = 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 S
16、ubPrivate Sub Command8_Click()Form1.Caption = " 欢迎使用智能计算器If Text3.Text <> "" ThenText1.Text = Text3.TextText2.Text = ""Text3.Text = ""ElseForm1.Caption = "xataliq kuruldi"Text3.Text = " 没有结果无法继续 "End IfEnd SubPrivate Sub Text2_Change()End
17、SubPrivate Sub 乘 _Click()Form1.Caption = " 欢迎使用智能计算器 "If Check1.Value = "1" ThenElseIf Text1.Text = "" Or Text2.Text = "" Then Form1.Caption = "xataliq kuruldi" Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = "" And Text2.Text = &quo
18、t;" ThenForm1.Caption = "xataliq kuruldi"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 = "" Then Form1.Caption
19、= "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1
20、.Text = ""Text2.Text = ""End IfEnd SubPrivate Sub 除 _Click()Form1.Caption = " 欢迎使用智能计算器If Check1.Value = "0" ThenElseIf Text1.Text = "" Or Text2.Text = "" Then Form1.Caption = "xataliq kuruldi" Text3.Text = " 运算数值不能为空 "ElseIf
21、 Text1.Text = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Val(Text2.Text) = "0" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 分数的分子不能为零 "ElseDim a, b, c As Doublea = Val(Text1.
22、Text)b = Val(Text2.Text)c = a / bText3.Text = cText1.Text = ""Text2.Text = ""End IfIf Check1.Value = "1" ThenElseIf Text1.Text = "" Or Text2.Text = "" Then Form1.Caption = "xataliq kuruldi" Text3.Text = " 运算数值不能为空 "ElseIf Text1.Te
23、xt = "" And Text2.Text = "" ThenForm1.Caption = " 错误 "Text3.Text = " 运算数值不能为空 "ElseIf Val(Text2.Text) = "0" Then Form1.Caption = " 错误 "Text3.Text = " 分数的分子不能为零 "ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d
24、/ eText3.Text = fEnd IfEnd SubPrivate Sub munasiwetlik_Click()Form1.Caption = " 欢迎使用智能计算器Form1.HideForm3.ShowIIPrivate Sub 继续 _Click()Form1.Caption = " 欢迎使用智能计算器If Text3.Text <> "" ThenText1.Text = Text3.TextText2.Text = ""Text3.Text = ""ElseForm1.Captio
25、n = "xataliq"Text3.Text = " 没有结果无法继续 "End IfEnd SubPrivate Sub 加 _Click()Form1.Caption = " 欢迎使用智能计算器 "If Check1.Value = "0" ThenElseIf Text1.Text = "" Or Text2.Text = "" Then Form1.Caption = "xataliq kuruldi"Text3.Text = " 运算
26、数值不能为空 "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.V
27、alue = "1" ThenElseIf Text1.Text = "" Or Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运算数值不能为空 "ElseIf Text1.Text = "" And Text2.Text = "" ThenForm1.Caption = "xataliq kuruldi"Text3.Text = " 运
28、算数值不能为空 "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 = "" Then Form1.Caption = "xataliq kuruldi" Text3.Text = " 运算数值不能为
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 增进客户满意度的郑重承诺书范文6篇
- 人力资源招聘及选拔过程标准化操作指南
- 电竞合作守秘责任保证函范文9篇
- 走进大自然感受生命的魅力写景篇(4篇)
- 其他范围特定承诺书范文3篇
- 确保用户信息不被泄露承诺书9篇
- 新一代智能仓储管理系统研发计划
- 定价信守规范经营承诺函7篇
- 工程质量管理标准化手册提高工程品质
- 供应链管理流程模板
- 手部伤害工厂安全培训课件
- 物流交付环节管理办法
- 2025年消防党组织谈心谈话记录范文
- 基于PLC的立体仓库堆垛机智能控制系统设计
- 五小活动成果汇报
- DB61∕T 1916-2024 土石山区土地整治技术规程
- 2025年【大型双选会】中国恩菲工程技术有限公司春季校园招聘30人笔试历年参考题库附带答案详解
- 《互联网营销师(直播销售员)五级(初级)理论知识考核要素细目表》
- 内衣店新员工入职培训
- 电网检修培训课件下载
- 电器元件销售管理制度
评论
0/150
提交评论