第一范文网 - 专业文章范例文档资料分享平台

vb简单的计算机源代码

来源:用户分享 时间:2025/8/25 14:09:49 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

vb简单的计算机源代码.txt如果青春的时光在闲散中度过,那么回忆岁月将是一场凄凉的悲剧。杂草多的地方庄稼少,空话多的地方智慧少。即使路上没有花朵,我仍可以欣赏荒芜。Private Sub Command1_Click()

Form1.Caption = \欢迎使用智能计算器\ '载入默认正常显示 If Check1.Value = \ '1类分歧 ElseIf Text1.Text = \ Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \ Form1.Caption = \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

If Check1.Value = \

'2类分歧 '2类分歧 '2类分歧 '1类分歧

ElseIf Text1.Text = \ '2类分歧 Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \ '2类分歧 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 Command2_Click() Form1.Caption = \欢迎使用智能计算器\If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \

'2类分歧

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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \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 Command3_Click() Form1.Caption = \欢迎使用智能计算器\If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \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 = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\ElseIf Val(Text2.Text) = \Form1.Caption = \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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

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

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 <> \Text1.Text = Text3.Text Text2.Text = \Text3.Text = \Else

Form1.Caption = \Text3.Text = \没有结果无法继续\

End If End Sub

Private Sub Text2_Change() End Sub

Private Sub 乘_Click()

Form1.Caption = \欢迎使用智能计算器\If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \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 = \欢迎使用智能计算器\

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\ElseIf Val(Text2.Text) = \Form1.Caption = \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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \

Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \错误\

Text3.Text = \运算数值不能为空\ElseIf Val(Text2.Text) = \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 munasiwetlik_Click() Form1.Caption = \欢迎使用智能计算器\Form1.Hide Form3.Show End Sub

Private Sub 继续_Click()

Form1.Caption = \欢迎使用智能计算器\If Text3.Text <> \Text1.Text = Text3.Text Text2.Text = \Text3.Text = \Else

Form1.Caption = \Text3.Text = \没有结果无法继续\End If End Sub

Private Sub 加_Click()

Form1.Caption = \欢迎使用智能计算器\If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \错误\

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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \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 减_Click()

Form1.Caption = \欢迎使用智能计算器\If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \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

If Check1.Value = \

ElseIf Text1.Text = \Form1.Caption = \错误\

Text3.Text = \运算数值不能为空\

ElseIf Text1.Text = \Form1.Caption = \错误\

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 = \欢迎使用智能计算器\Text1.Text = \Text2.Text = \Text3.Text = \End Sub

----------------------------------------------

form2 ?? ???? ??????

Private Sub Command1_Click() Form3.Hide Form1.Show

Form1.Text3.Text = \End Sub

Private Sub Command2_Click() End End Sub

搜索更多关于: vb简单的计算机源代码 的文档
vb简单的计算机源代码.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c64z3p1e6dx1lh1d7s0l19lpyv23wwc008lv_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top