11智能在线
新记
在vb中如何使一个按钮点击一次变换名称在点击就会结束
如题所述
举报该文章
相关建议 2012-03-18
试一下 :
Private Sub Command1_Click()
If Command1.Caption = "退出" Then
Unload Me
Else
Command1.Caption = "退出"
End If
End Sub
Private Sub Form_Load()
Command1.Caption = "确定"
End Sub
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/8m4ffppm7.html
其他看法
第1个回答 2012-03-18
Dim i As Integer
Private Sub Command1_Click()
Command1.Caption = "111"
i = i + 1
If i = 2 Then
End
End If
End Sub
先在通用里面定义一个变量 然后单击一次时变量改变 再单击一次时变量达到条件 触发END 退出
第2个回答 2012-03-19
If 按钮.Caption = "结束" Then
End
ElseIf 按钮.Caption = "弹出信息框" Then
按钮.Caption = "结束"
MsgBox "信息内容"
End If
关闭窗口使用Unload Me,完全退出程序使用 end
相似回答
大家正在搜
相关问题
vb中怎样使按钮每点击一次位移一次
vb中如何让按钮点击一次后就失效,再点击另一个按钮后恢复,另...
vb怎样实现某个按钮自动点击
在VB中,怎样做才能使按钮单击一次,按钮名称显示为A,再单击...
vb中怎么实现点击按钮时,标签里显示该按钮的名称
vb 如何每次单击一次按钮变量x加1?
vb 怎么使一个click事件不可用,再点击一个按钮后才可用
VB中,同一个按钮,先后单击两次功能不同,怎么实现。