版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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 kuruldi Text3.Text = 运算数值不能为空 2 类分歧 ElseIf Te
2、xt1.Text = And Text2.Text = Then 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 Text3.Text = c Text1.Text = Text2.Text = End If If Check1.Value = 1 Then 1 ElseIf Text1.Text = Or Text2.Text = Then 2 类分歧 类分歧 Form
3、1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = Then 2 类分歧 Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 2 Else 类分歧 Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f = d + e Text3.Text = f End If End Sub Private Sub Command2_Click() Form1.
4、Caption = 欢迎使用智能计算器 If Check1.Value = 1 Then ElseIf Text1.Text = Or Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = Then 精品文库 Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Te
5、xt2.Text) f = d - e Text3.Text = f End If If CheckI.Value = 0 Then Elself TextI.Text = Or Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf TextI.Text = A nd Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim a, b, c As Double a = Val(Te
6、xtl.Text) b = Val(Text2.Text) c = a - b Text3.Text = c Text1.Text = Text2.Text = End If End Sub Private Sub Comma nd3_Click() Forml.Ca ption =欢迎使用智能计算器” If CheckI.Value = 1 The n ElseIf TextI.Text = Or Text2.Text = The n Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf TextI.Text = A n
7、d Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f = d * e Text3.Text = f End If If CheckI.Value = 0 Then Elself TextI.Text = Or Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Els
8、eIf TextI.Text = A nd Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Text) c = a * b Text3.Text = c Text1.Text = Text2.Text = End If End Sub Private Sub Comma nd4_Click() Forml.Ca ption =欢迎使用智能计算器” If CheckI.Valu
9、e = 0 The n ElseIf Text1.Text = Or Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Text1.Text = A nd Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Val(Text2.Text) = 0 The n Forml.Ca pti on = xataliq kuruldi Text3.Text = 分数的分子不能为零 ”
10、Else Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Text) c = a / b Text3.Text = c Text1.Text = Text2.Text = End If If Check1.Value = 1 Then ElseIf TextI.Text = Or Text2.Text = The n Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Elself TextI.Text = A nd Text2.Text = Then Form1.Ca
11、pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Val(Text2.Text) = 0 The n Form1.Ca pti on = xataliq kuruldi Text3.Text = 分数的分子不能为零” Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f = d / e Text3.Text = f End If End Sub Private Sub Comma nd5_Click() HH Form1.Ca ption =欢迎使用智能
12、计算器 Text1.Text = Text2.Text = HH Text3.Text = HH End Sub Private Sub Comma nd6_Click() Form1.Ca ption = 欢迎使用智能计算器 Form1.Hide Form3.Show End Sub Private Sub Comma nd7_Click() End End Sub Private Sub Comma nd8_Click() Form1.Ca ption =欢迎使用智能计算器 If Text3.Text The n Text1.Text = Text3.Text Text2.Text = T
13、ext3.Text = Else Form1.Ca pti on = xataliq kuruldi Text3.Text =没有结果无法继续” End If End Sub Private Sub Text2_Cha nge() End Sub Private Sub乘_ Click() Forml.Ca ption = 欢迎使用智能计算器” If CheckI.Value = 1 The n ElseIf TextI.Text = Or Text2.Text = The n Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” El
14、self Text1.Text = A nd Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f = d * e Text3.Text = f End If If ChecQ.Value = 0 Then ElseIf Text1.Text = Or Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3
15、.Text =运算数值不能为空” ElseIf TextI.Text = A nd Text2.Text = Then Forml.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Text) c = a * b Text3.Text = c Text1.Text = Text2.Text = End If End Sub Private Sub除 _Click() Forml.Ca ption = 欢迎使用智能计算器” I
16、f CheckI.Value = 0 Then Elself TextI.Text = Or Text2.Text = Then Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Text1.Text = A nd Text2.Text = Then Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Val(Text2.Text) = 0 The n Form1.Ca pti on = xataliq kuruldi Text3.Text =
17、分数的分子不能为零 ” Else Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Text) c = a / b Text3.Text = c Text1.Text = Text2.Text = End If If Check1.Value = 1 Then ElseIf Text1.Text = Or Text2.Text = The n Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Text1.Text = A nd Text2.Text = Th
18、en Form1.Caption =错误 Text3.Text =运算数值不能为空” ElseIf Val(Text2.Text) = 0 The n Form1.Caption = ”错误” Text3.Text =分数的分子不能为零 ” Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f = d / e Text3.Text = f End If End Sub Private Sub mun asiwetlik_Click() Form1.Ca ption =欢迎使用智能计算器” Form1.Hide
19、Form3.Show End Sub Private Sub 继续 _Click() Form1.Ca ption = 欢迎使用智能计算器” If Text3.Text Then TextI.Text = Text3.Text Text2.Text = Text3.Text = Else Form1.Ca pti on = xataliq Text3.Text =没有结果无法继续” End If End Sub Private Sub加 加 _Click() Form1.Ca ption =欢迎使用智能计算器” If Check1.Value = 0 The n ElseIf Text1.Te
20、xt = Or Text2.Text = The n Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Text1.Text = A nd Text2.Text = Then Form1.Caption = ” 错误” Text3.Text =运算数值不能为空 Else Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Text) Text3.Text = c Text1.Text = Text2.Text = End If If ChecQ.Value =
21、 1 Then Then ElseIf Text1.Text = Or Text2.Text = Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空 ElseIf Text1.Text = A nd Text2.Text = Then Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2.Text) f = d + e Text3.Text = f End If End Sub Private Sub减 _Click() Form1.Ca ption =欢迎使用智能计算器” If Check1.Value = 1 The n ElseIf Text1.Text = Or Text2.Text = The n Form1.Ca pti on = xataliq kuruldi Text3.Text =运算数值不能为空” ElseIf Text1.Text = A nd
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 山西2026年银行业专业人员中级职业资格考试(专业实务银行管理)试题及答案
- 河北银行业专业人员中级职业资格考试(专业实务银行管理)试题及答案(2026年)
- 2026四川成都彭州市招聘市属国有企业领导班子成员2人笔试历年参考题库
- 2026年注册核安全工程师(核安全专业实务)试题及答案
- 2026年中医药知识竞赛题库含答案
- 2026年中级银行业专业人员职业资格考试(专业实务公司信贷)自测试题库及答案南充
- 2026年银行业专业人员初级职业资格考试(专业实务公司信贷)仿真试题及答案
- 2026年卫生高级职称面审答辩(麻醉学)(副高面审)经典试题及答案三
- 2026年交警实操考试题库及参考答案(综合卷)
- 2026年高级教师职称答辩题库含答案
- 2026年长沙商贸旅游职业技术学院单招职业倾向性测试题库及参考答案详解
- 2026甘肃省农垦集团有限责任公司招聘生产技术人员78人备考题库及1套完整答案详解
- 2026四川富润企业重组投资有限责任公司应届毕业生招聘4人备考题库含答案详解
- 2026浙江杭州萧山区义蓬街道国有企业招聘4人笔试参考题库及答案详解
- 固德威:ESA系列125kW 261kWh工商业储能系统用户手册
- 《中华人民共和国药品管理法实施条例》培训解读课件
- 2026年红色文化专题知识竞赛
- 2026年黑龙江省政府采购代理机构从业人员考试复习题及答案
- 电梯安装工程技术资料-电梯竣工资料
- 人教版七年级地理下册要点
- 2026中国航空航天复合材料减重效果与成本控制研究报告
评论
0/150
提交评论