vb编程高手进,高分求助

来源:百度知道 编辑:UC知道 时间:2024/05/20 00:18:49
设计一个四则运算程序,通过菜单选择四则运算的种类,计算方式在界面上显示。当点击菜单中的清除按钮时,文本框中的内容清除,当点击菜单中的计算按钮时,按所选方式进行计算,并把结果显示,除法计算时,对除数进行检查,如果除数为0,利用对话框进行警示。菜单中有帮助按钮,点击时,弹出一个帮助窗口,对该运算进行简单说明。

'窗体代码请到我的空间提取
http://hi.baidu.com/cxh20080808/blog/item/f1038335d812a1335bb5f5d9.html
Private Sub Form_Load()
mnuClear_Click
End Sub

Private Sub mnuAdd_Click()
If checkText Then
Label1.Caption = "+"
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End If
End Sub
Private Sub mnuSub_Click()
If checkText Then
Label1.Caption = "-"
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End If
End Sub
Private Sub mnuMu_Click()
If checkText Then
Label1.Caption = "x"
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End If
End Sub
Private Sub mnuDi_Click()
If checkText Then
If Val(Text2.Text) Then
Label1.Caption = "/"
Text3.Text = Val(Text1.Te