VB中 点击command1改变label1内容的代码?! 跪求! 初学者大神勿喷
展开全部
Private isLabelClicked As Boolean
Private Sub Command1_Click()
If isLabelClicked Then
MsgBox "label已点击,点击command执行if下的语句"
Else
MsgBox "label没有点击,点击command执行else下的语句"
End If
End Sub
Private Sub Form_Load()
isLabelClicked = False
End Sub
Private Sub Label1_Click()
isLabelClicked = True
End Sub
Private Sub Command1_Click()
If isLabelClicked Then
MsgBox "label已点击,点击command执行if下的语句"
Else
MsgBox "label没有点击,点击command执行else下的语句"
End If
End Sub
Private Sub Form_Load()
isLabelClicked = False
End Sub
Private Sub Label1_Click()
isLabelClicked = True
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询