[VB6 ] 還是計算機

看板Visual_Basic作者 (我的世界很美麗)時間18年前 (2007/12/15 13:57), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
有看到版上有解答 可是以目前我所會的看不懂板上的計算機 我想要用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
文章代碼(AID): #17OspJGQ (Visual_Basic)
討論串 (同標題文章)
文章代碼(AID): #17OspJGQ (Visual_Basic)