请把按钮命名过程写清楚!谢谢
第1个回答 2011-11-07
只要按代码要求建立控件就可以了
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0
Text3.Text = Val(Text1.Text) + Text2.Text
Case 1
Text3.Text = Val(Text1.Text) - Text2.Text
Case 2
Text3.Text = Val(Text1.Text * Text2.Text)
Case 3
Text3.Text = Val(Text1.Text) / Text2.Text
Case 4
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form1.Cls
Case 5
End
End Select
End Sub
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0
Text3.Text = Val(Text1.Text) + Text2.Text
Case 1
Text3.Text = Val(Text1.Text) - Text2.Text
Case 2
Text3.Text = Val(Text1.Text * Text2.Text)
Case 3
Text3.Text = Val(Text1.Text) / Text2.Text
Case 4
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form1.Cls
Case 5
End
End Select
End Sub
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0
Text3.Text = Val(Text1.Text) + Text2.Text
Case 1
Text3.Text = Val(Text1.Text) - Text2.Text
Case 2
Text3.Text = Val(Text1.Text * Text2.Text)
Case 3
Text3.Text = Val(Text1.Text) / Text2.Text
Case 4
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form1.Cls
Case 5
End
End Select
End Sub追问
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0
Text3.Text = Val(Text1.Text) + Text2.Text
Case 1
Text3.Text = Val(Text1.Text) - Text2.Text
Case 2
Text3.Text = Val(Text1.Text * Text2.Text)
Case 3
Text3.Text = Val(Text1.Text) / Text2.Text
Case 4
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form1.Cls
Case 5
End
End Select
End Sub
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0
Text3.Text = Val(Text1.Text) + Text2.Text
Case 1
Text3.Text = Val(Text1.Text) - Text2.Text
Case 2
Text3.Text = Val(Text1.Text * Text2.Text)
Case 3
Text3.Text = Val(Text1.Text) / Text2.Text
Case 4
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form1.Cls
Case 5
End
End Select
End Sub
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0
Text3.Text = Val(Text1.Text) + Text2.Text
Case 1
Text3.Text = Val(Text1.Text) - Text2.Text
Case 2
Text3.Text = Val(Text1.Text * Text2.Text)
Case 3
Text3.Text = Val(Text1.Text) / Text2.Text
Case 4
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form1.Cls
Case 5
End
End Select
End Sub追问
似乎跟我说的不一样啊,我的只需要一个text
追答按照如图所示的的建立控件就可以了,记住command是一个控件数组你自己看一下
第2个回答 2011-11-07
123
456 456
789
0#*
456 456
789
0#*
参考资料:手机
第3个回答 2011-11-07
楼主网上有好多源码啊 ,你随便搜一下就有一大堆啊,自己下一个吧追问
是啊 ,可是比较乱,在vb里运行不了,总会出现这样那样的问题……