| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 652 人关注过本帖
标题:为什么我的VB计算机程序是错的
只看楼主 加入收藏
wshyj18
Rank: 1
等 级:新手上路
帖 子:124
专家分:0
注 册:2007-5-14
收藏
 问题点数:0 回复次数:2 
为什么我的VB计算机程序是错的
Private Sub Command1_Click()
Dim a, b, c, d As Integer
Text1.Text = Text1.Text + "1"
End Sub

Private Sub Command10_Click()
Text1.Text = Text1.Text + "0"
End Sub

Private Sub Command11_Click()
Text1.Text = ""
a = 1
b = Val(Text1.Text)
End Sub

Private Sub Command12_Click()
Text1.Text = ""
a = 2
b = Val(Text1.Text)
End Sub
Private Sub Command13_Click()
Text1.Text = ""
a = 3
b = Val(Text1.Text)
End Sub

Private Sub Command14_Click()
Text1.Text = ""
a = 4
b = Val(Text1.Text)
End Sub


Private Sub Command2_Click()
Text1.Text = Text1.Text + "2"
End Sub

Private Sub Command3_Click()
Text1.Text = Text1.Text + "3"
End Sub


Private Sub Command4_Click()
Text1.Text = Text1.Text + "4"
End Sub

Private Sub Command5_Click()
Text1.Text = Text1.Text + "5"
End Sub

Private Sub Command6_Click()
Text1.Text = Text1.Text + "6"
End Sub

Private Sub Command7_Click()
Text1.Text = Text1.Text + "7"
End Sub

Private Sub Command8_Click()
Text1.Text = Text1.Text + "8"
End Sub

Private Sub Command9_Click()
Text1.Text = Text1.Text + "9"
End Sub
Private Sub Command15_Click()
c = Val(Text1.Text)
Text1.Text = ""
Select Case a
Case 1: Text1.Text = b + c
Case 2: Text1.Text = b - c
Case 3: Text1.Text = b * c
Case 4: Text1.Text = b / c
End Select
End Sub
就是得不到结果,不知道为何
搜索更多相关主题的帖子: 计算机程序 
2008-03-10 22:46
wshyj18
Rank: 1
等 级:新手上路
帖 子:124
专家分:0
注 册:2007-5-14
收藏
得分:0 
经过研究,问题总算是解决了
Dim a As Integer, b As Integer, c As Integer
Private Sub Command1_Click()
Text1.Text = Text1.Text + "1"
End Sub

Private Sub Command10_Click()
Text1.Text = Text1.Text + "0"
End Sub

Private Sub Command11_Click()
b = Val(Text1.Text)
Text1.Text = ""
a = 1
End Sub

Private Sub Command12_Click()
b = Val(Text1.Text)
Text1.Text = ""
a = 2

End Sub
Private Sub Command13_Click()
b = Val(Text1.Text)
Text1.Text = ""
a = 3

End Sub

Private Sub Command14_Click()
b = Val(Text1.Text)
Text1.Text = ""
a = 4

End Sub


Private Sub Command2_Click()
Text1.Text = Text1.Text + "2"
End Sub

Private Sub Command3_Click()
Text1.Text = Text1.Text + "3"
End Sub


Private Sub Command4_Click()
Text1.Text = Text1.Text + "4"
End Sub

Private Sub Command5_Click()
Text1.Text = Text1.Text + "5"
End Sub

Private Sub Command6_Click()
Text1.Text = Text1.Text + "6"
End Sub

Private Sub Command7_Click()
Text1.Text = Text1.Text + "7"
End Sub

Private Sub Command8_Click()
Text1.Text = Text1.Text + "8"
End Sub

Private Sub Command9_Click()
Text1.Text = Text1.Text + "9"
End Sub
Private Sub Command15_Click()
c = Val(Text1.Text)
Text1.Text = ""
Select Case a
Case 1: Text1.Text = b + c
Case 2: Text1.Text = b - c
Case 3: Text1.Text = b * c
Case 4: Text1.Text = b / c
End Select
End Sub

2008-03-11 08:56
随风逐流
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:passerby
等 级:版主
威 望:8
帖 子:4054
专家分:271
注 册:2007-6-13
收藏
得分:0 
解决了就好

[url=http://www./html/6/6694/]极道金丹[/url][url=http://www./html/2/2849/]九阴九阳[/url][url=http://www./html/2/2596/]凡人修仙传[/url]
2008-03-11 09:03
快速回复:为什么我的VB计算机程序是错的
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016871 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved