vb程序中怎么设计一个窗体,求输入两个数字加减乘除的结果,只用一个文本框 5
1个回答
展开全部
Function CalcStr(StrNum As String) As Double
Dim MSSC As Object
Set MSSC = CreateObject("MSScriptControl.ScriptControl")
MSSC.Language = "VBScript"
CalcStr = MSSC.Eval(StrNum)
Set MSSC = Nothing
End Function
Private Sub Command1_Click()
Text1.Text = CalcStr(Text1.Text)
End Sub
Dim MSSC As Object
Set MSSC = CreateObject("MSScriptControl.ScriptControl")
MSSC.Language = "VBScript"
CalcStr = MSSC.Eval(StrNum)
Set MSSC = Nothing
End Function
Private Sub Command1_Click()
Text1.Text = CalcStr(Text1.Text)
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询