如何用VB做简易的四则运算计算器
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 16:25:16
如何用VB做简易的四则运算计算器
如图 谢谢!
dim a as integer
dim b as integer
a=text1.text
b=text2.text
Private Sub Command1_Click()
text3.text=val(a+b)
end sub
Private Sub Command2_Click()
text3.text=val(a-b)
end sub
Private Sub Command3_Click()
text3.text=val(a*b)
end sub
Private Sub Command4_Click()
text3.text=val(a/b)
end su
dim b as integer
a=text1.text
b=text2.text
Private Sub Command1_Click()
text3.text=val(a+b)
end sub
Private Sub Command2_Click()
text3.text=val(a-b)
end sub
Private Sub Command3_Click()
text3.text=val(a*b)
end sub
Private Sub Command4_Click()
text3.text=val(a/b)
end su