vb按钮的问题
你好, 假设我要设置5个本身为0的按钮, 假设按钮本身为0,当按下按钮后0变成1,当再次按下后变成2,直到变成4. 然后我想再设置一个新的按钮(总开关~),无论先前的几个按钮显示的数字是几,当按下新的按钮后,先前按钮上的数字都变成0.(还有5个按钮都是独立操作的,不能按一下一个按钮,其他的按钮上的数字也跟着变) 谢谢
实现你功能的代码如下: Private Sub Command1_Click() If Command1。Caption = 0 Then Command1。Caption = 1: Exit Sub If Command1。Caption = 1 Then Command1。
Caption = 2: Exit Sub If Command1。Caption = 2 Then Command1。Caption = 3: Exit Sub If Command1。Caption = 3 Then Command1。
Caption = 4: Exit Sub If Command1。Caption = 4 Then Command1。Caption = 0 End Sub Private Sub Command2_Click() If Command2。
Caption = 0 Then Command2。Caption = 1: Exit Sub If Command2。Caption = 1 Then Command2。Caption = 2: Exit Sub If Command2。
Caption = 2 Then Command2。Caption = 3: Exit Sub If Command2。Caption = 3 Then Command2。Caption = 4: Exit Sub If Command2。
Caption = 4 Then Command2。Caption = 0 End Sub Private Sub Command3_Click() If Command3。Caption = 0 Then Command3。Caption = 1: Exit Sub If Command3。
Caption = 1 Then Command3。Caption = 2: Exit Sub If Command3。Caption = 2 Then Command3。Caption = 3: Exit Sub If Command3。
Caption = 3 Then Command3。Caption = 4: Exit Sub If Command3。Caption = 4 Then Command3。Caption = 0 End Sub Private Sub Command4_Click() If Command4。
Caption = 0 Then Command4。Caption = 1: Exit Sub If Command4。Caption = 1 Then Command4。Caption = 2: Exit Sub If Command4。
Caption = 2 Then Command4。Caption = 3: Exit Sub If Command4。Caption = 3 Then Command4。Caption = 4: Exit Sub If Command4。
Caption = 4 Then Command4。Caption = 0 End Sub Private Sub Command5_Click() If Command5。Caption = 0 Then Command5。Caption = 1: Exit Sub If Command5。
Caption = 1 Then Command5。Caption = 2: Exit Sub If Command5。Caption = 2 Then Command5。Caption = 3: Exit Sub If Command5。
Caption = 3 Then Command5。Caption = 4: Exit Sub If Command5。Caption = 4 Then Command5。Caption = 0 End Sub Private Sub Command6_Click() Command1。
Caption = 0 Command2。Caption = 0 Command3。Caption = 0 Command4。Caption = 0 Command5。Caption = 0 End Sub 。
答:请问在这个栏里回答问题后怎么没提交的按钮? 怎么会没有呢。。。。。。。。。。。详情>>