作者a886759 (我的世界很美丽)
看板Visual_Basic
标题[VB6 ] 还是计算机
时间Sat Dec 15 13:57:38 2007
有看到版上有解答
可是以目前我所会的看不懂板上的计算机
我想要用if than或select case 做计算机
并且是显示在text里
我目前知道的是
Command1 是0~9
Command2 是+-*/=
Command3 是清除键
贴上我目前写的
Private Sub Command1_Click(Index As Integer)
If Text1.Text = "" Then
Text1.Text = LTrim(Str(Index))
Else
Text1.Text = Text1.Text + LTrim(Str(Index))
End If
Text2.Text = Text1.Text
End Sub
Private Sub Command2_Click(Index As Integer)
If Index = "0" Then
Text1.Text = ""
Text3.Text = Text2.Text + Text1.Text
End If
End Sub
Private Sub Command3_Click()
text1.text = ""
text2.text = ""
text3.text = ""
End Sub
Private Sub Form_Load()
text1.text = ""
text2.text = ""
text3.text = ""
End Sub
command2运算还没写完
全部也都还不充足
我希望之後还可以加入小数点及x^2等等
不过打算先完成十位数及一般运算
不这样就已经足以难倒我了> <
麻烦各位聪明的大大了
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.168.131.240