vb简单的计算机源代码[参考]

上传人:x****育 文档编号:146266995 上传时间:2020-09-28 格式:PDF 页数:9 大小:52.98KB
返回 下载 相关 举报
vb简单的计算机源代码[参考]_第1页
第1页 / 共9页
vb简单的计算机源代码[参考]_第2页
第2页 / 共9页
vb简单的计算机源代码[参考]_第3页
第3页 / 共9页
vb简单的计算机源代码[参考]_第4页
第4页 / 共9页
vb简单的计算机源代码[参考]_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《vb简单的计算机源代码[参考]》由会员分享,可在线阅读,更多相关《vb简单的计算机源代码[参考](9页珍藏版)》请在金锄头文库上搜索。

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 = 运算数值不能为空 ElseIf Text1.Text

2、 = 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 Text3.Text = c Text1.Text = Text2.Text = End If If Check1.Value = 1 Then 1 类分歧 ElseIf Text1.Text = Or Text2.Text = Then 2 类分歧 Form1.

3、Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = Then 2 类分歧 Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 Else 2 类分歧 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.Ca

4、ption = 欢迎使用智能计算器 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 1 / 9 Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 Else Dim d, e, f As Double d = Val(Text1.Text) e = Val(Text2

5、.Text) f = d - e Text3.Text = f End If If Check1.Value = 0 Then ElseIf Text1.Text = Or Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 Else Dim a, b, c As Double a = Val(Text1.Text

6、) b = Val(Text2.Text) c = a - b Text3.Text = c Text1.Text = Text2.Text = End If End Sub Private Sub Command3_Click() Form1.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 =

7、Then Form1.Caption = 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 2 / 9 If Check1.Value = 0 Then ElseIf Text1.Text = Or Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Tex

8、t = And Text2.Text = Then Form1.Caption = 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 Command4_Click() Form1.Caption = 欢迎使用智能计算器 If Check1.Value = 0 Then ElseIf

9、Text1.Text = Or Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Val(Text2.Text) = 0 Then Form1.Caption = xataliq kuruldi Text3.Text = 分数的分子不能为零 Else Dim a, b, c As Double a

10、= 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 = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 3 / 9 ElseIf Text1.Text = And Text2.Text = Then Form1.Caption = xataliq kuruldi Text

11、3.Text = 运算数值不能为空 ElseIf Val(Text2.Text) = 0 Then Form1.Caption = 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 Command5_Click() Form1.Caption = 欢迎使用智能计算器 Text1.Text = Text2.Text = Text3.T

12、ext = End Sub Private Sub Command6_Click() Form1.Caption = 欢迎使用智能计算器 Form1.Hide Form3.Show End Sub Private Sub Command7_Click() End End Sub Private Sub Command8_Click() Form1.Caption = 欢迎使用智能计算器 If Text3.Text Then Text1.Text = Text3.Text Text2.Text = Text3.Text = Else Form1.Caption = xataliq kuruldi

13、 Text3.Text = 没有结果无法继续 4 / 9 End If End Sub Private Sub Text2_Change() End Sub Private Sub 乘_Click() Form1.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 Form1.Capti

14、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 Check1.Value = 0 Then ElseIf Text1.Text = Or Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = T

15、hen Form1.Caption = 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() Form1.Caption = 欢迎使用智能计算器 5 / 9 If Check1.Value = 0 Then ElseIf Text1.Text = Or Text2.T

16、ext = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Text1.Text = And Text2.Text = Then Form1.Caption = xataliq kuruldi Text3.Text = 运算数值不能为空 ElseIf Val(Text2.Text) = 0 Then Form1.Caption = xataliq kuruldi Text3.Text = 分数的分子不能为零 Else Dim a, b, c As Double a = Val(Text1.Text) b = Val(Text2.Te

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号