版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年中职中医康复保健(中医养生技术)试题及答案
- 2025年高职幼儿保育(幼儿教育操作规范)试题及答案
- 2025年中职铁道运输管理(铁道应用)试题及答案
- 2025年高职机电一体化技术(机电系统集成)试题及答案
- 2025年中职(烹饪工艺与营养)中式面点工艺试题及答案
- 2025年中职无人机操控与维护(飞行原理应用)试题及答案
- 2025年高职(酒店管理)前厅服务规范试题及答案
- 2025年大学化工类(化工维护保养)试题及答案
- 2025年中职(生态环境保护与修复)生态修复技术阶段测试试题及答案
- 2025年大学铁道交通运营管理(铁道运输规划)试题及答案
- 儿童组织细胞坏死性淋巴结炎诊断与治疗专家共识解读 2
- 2025体彩知识考试题及答案
- 狼和鸭子儿童故事课件
- 驳回再审裁定书申请抗诉范文
- 2025北京高三二模语文汇编:微写作
- DB6301∕T 4-2023 住宅物业星级服务规范
- 护理查房与病例讨论区别
- 土建资料管理课件
- 公司安全大讲堂活动方案
- GB/T 42186-2022医学检验生物样本冷链物流运作规范
- T/CA 105-2019手机壳套通用规范
评论
0/150
提交评论