vb简单的计算机源代码_第1页
vb简单的计算机源代码_第2页
vb简单的计算机源代码_第3页
vb简单的计算机源代码_第4页
vb简单的计算机源代码_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、.vb 简单的计算机源代码 .txt 如果青春的时光在闲散中度过, 那么回忆岁月将是一场凄凉的悲剧。杂草多的地方庄稼少,空话多的地方智慧少。即使路上没有花朵,我仍可以欣赏荒芜。 Private Sub Command1_Click()Form1.Caption = 欢迎使用智能计算器载入默认正常显示If Check1.Value = 0 Then1 类分歧ElseIf Text1.Text = Or Text2.Text = Then2 类分歧Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And

2、Text2.Text = Then2 类分歧Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空Else2 类分歧Dim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a + bText3.Text = cText1.Text = Text2.Text = End IfIf Check1.Value = 1 Then1 类分歧ElseIf Text1.Text = Or Text2.Text = Then2 类分歧Form1.Caption = xataliq kurul

3、diText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = Then2 类分歧Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空Else2 类分歧Dim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d + eText3.Text = fEnd IfEnd SubPrivate Sub Command2_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 1 Th

4、enElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = Then精选范本.Form1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d - eText3.Text = fEnd IfIf Check1.Value

5、= 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a - bText3.Text = cText1.Text = Text2.Te

6、xt = End IfEnd SubPrivate Sub Command3_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 1 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim d, e, f As D

7、oubled = Val(Text1.Text)e = Val(Text2.Text)f = d * eText3.Text = fEnd If精选范本.If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim a, b,

8、c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1.Text = Text2.Text = End IfEnd SubPrivate Sub Command4_Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text =

9、And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Caption = xataliq kuruldiText3.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.Value = 1 ThenE

10、lseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空精选范本.ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Caption = xataliq kuruldiText3.Text = 分数的分子不能为零ElseDim d, e, f As Doubled

11、= Val(Text1.Text)e = Val(Text2.Text)f = 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 SubPrivate Sub

12、 Command8_Click()Form1.Caption = 欢迎使用智能计算器If Text3.Text ThenText1.Text = Text3.TextText2.Text = Text3.Text = ElseForm1.Caption = xataliq kuruldiText3.Text = 没有结果无法继续精选范本.End IfEnd SubPrivate Sub Text2_Change()End SubPrivate Sub 乘 _Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 1 ThenElseIf Text1.

13、Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.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

14、.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim a, b, c As Doublea = Val(Text1.Text)b = Val(Text2.Text)c = a * bText3.Text = cText1.Text = Text2.Text = End IfEnd SubPr

15、ivate Sub 除 _Click()Form1.Caption = 欢迎使用智能计算器精选范本.If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Capt

16、ion = xataliq kuruldiText3.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.Value = 1 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And

17、 Text2.Text = ThenForm1.Caption = 错误 Text3.Text = 运算数值不能为空ElseIf Val(Text2.Text) = 0 ThenForm1.Caption = 错误 Text3.Text = 分数的分子不能为零ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d / eText3.Text = fEnd IfEnd SubPrivate Sub munasiwetlik_Click()Form1.Caption = 欢迎使用智能计算器Form1.HideForm

18、3.ShowEnd Sub精选范本.Private Sub 继续 _Click()Form1.Caption = 欢迎使用智能计算器If Text3.Text ThenText1.Text = Text3.TextText2.Text = Text3.Text = ElseForm1.Caption = xataliqText3.Text = 没有结果无法继续End IfEnd SubPrivate Sub 加 _Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 0 ThenElseIf Text1.Text = Or Text2.Text =

19、 ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空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.Value = 1 ThenElseIf Text1.Text =

20、Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseDim d, e, f As Doubled = Val(Text1.Text)e = Val(Text2.Text)f = d + eText3.Text = f精选范本.End IfEnd SubPrivate Sub 减 _Click()Form1.Caption = 欢迎使用智能计算器If Check1.Value = 1 ThenElseIf Text1.Text = Or Text2.Text = ThenForm1.Caption = xataliq kuruldiText3.Text = 运算数值不能为空ElseIf Text1.Text = And Te

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论