VB 如何实现按扭多次点击

来源:百度知道 编辑:UC知道 时间:2024/05/13 17:08:33
想一直按一个按扭,让上面的图片或文本一直得变。。。

'假设现在form1上有一个按钮,一个文本框

Dim i As Integer

Private Sub Command1_Click()
If i <= 8 Then
Select Case (i)
Case 1
Text1.Text = "aaaa"
Case 2
Text1.Text = "bbbb"
Case 3
Text1.Text = "cccc"
Case 4
Text1.Text = "dddd"
Case 5
Text1.Text = "eeee"
Case 6
Text1.Text = "ffff"
Case 7
Text1.Text = "gggg"
Case 8
Text1.Text = "hhhh"
End Select
Else
Text1.Text = "aaaa"
i = 1
End If
i = i + 1
End Sub

Private Sub Form_Load()
i = 1
End Sub