Private Sub Form_Load()
Command1.Caption = "开关按钮"
Command2.Caption = "计数按钮"
Command3.Caption = "退出按钮"
End Sub
Private Sub Command1_Click()
If Command1.Caption = "开关按钮" Then
Command1.Caption = "打开状态"
ElseIf Command1.Caption = "打开状态" Then
Command1.Caption = "关闭状态"
ElseIf Command1.Caption = "关闭状态" Then
Command1.Caption = "打开状态"
End If
End Sub
Private Sub Command2_Click()
Static i As Integer
i = i + 1
Command2.Caption = i & "次按键"
End Sub
Private Sub Command3_Click()
End
End Sub
Command1.Caption = "开关按钮"
Command2.Caption = "计数按钮"
Command3.Caption = "退出按钮"
End Sub
Private Sub Command1_Click()
If Command1.Caption = "开关按钮" Then
Command1.Caption = "打开状态"
ElseIf Command1.Caption = "打开状态" Then
Command1.Caption = "关闭状态"
ElseIf Command1.Caption = "关闭状态" Then
Command1.Caption = "打开状态"
End If
End Sub
Private Sub Command2_Click()
Static i As Integer
i = i + 1
Command2.Caption = i & "次按键"
End Sub
Private Sub Command3_Click()
End
End Sub