


版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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 = " 运算数值不能为空 "ElseIf
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026届湖北随州市普通高中化学高一上期中达标检测模拟试题含解析
- 2025年考研英语(一)长篇阅读技巧提升与押题卷
- 2025年注册电气工程师考试试卷 电气设计专项训练:电气工程设计与施工协调
- 2025年注册土木工程师考试真题试卷 建筑结构设计专项训练
- 2025年高考英语阅读理解专项训练:长篇阅读技巧揭秘
- 星光学校开展校园安全生产大排查大整治行动自查自纠报告
- 测量员岗位职责是什么
- 2026届江西省上饶市上饶县中学高一化学第一学期期末监测模拟试题含解析
- 王者荣耀课件
- 商业代理合同书范本
- 海关退运协议书
- 新八德教育工作计划、总结模版
- 电梯、自动扶梯和自动人行道随行文件编制说明
- 学校捐款协议书范本
- 车间标签标识管理制度
- 农田托管合同样本
- 部编版小学语文一年级上册教案 全册
- 医院医用织物洗涤规范
- 金氏五行升降中医方集
- 银行业金融机构绩效考评监管指引
- 血液透析中出血的原因及预防
评论
0/150
提交评论