版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024精装房房屋租赁合同
- 2021年高考物理真题试卷(江苏卷)311带答案解析
- 新一代信息技术导论-第1章-绪
- 2024年个人造价咨询合同范本
- 2023年氟硅酸盐项目评估分析报告
- 建筑安全合同协议书2024年
- 2023年体检服务项目需求分析报告
- 2024年完整的离婚协议书模板
- 2024年商标权转让合同
- 建筑工程劳务分包合同协议书2024年
- 2024年山东省东营市中考道德与法治试卷真题(含答案解析)
- AUTOCAD完整考试题库388题(含标准答案)
- JT-T-1248-2019营运货车能效和二氧化碳排放强度等级及评定方法
- 2024年秋季自学考试00230合同法部分真题含解析
- 资金托盘合同模板
- 河南汉字大赛选拔赛试题
- 危机干预PowerPointPresentation1课件
- 《智取生辰纲-施耐庵作业设计方案-2023-2024学年初中语文统编版五四学制》
- 2024版传承红色基因赓续红色血脉
- (2024年)剪映入门教程课件
- 3D打印工艺的质量控制与优化
评论
0/150
提交评论