Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检查我是否可以在另一个按钮代码中调用一个按钮,或者检查它是否在该按钮之前被点击过。使用 homeandlearn.uk 和谷歌搜索进行搜索,但无法获得正确的结果
如果您需要在另一个(Button2)之前单击一个按钮(Button1),您会发现仅在第一个按钮的单击事件处理程序中启用第二个更容易。在设计器中将 Button2.Enabled 属性设置为 false ,这样就可以了:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Button2.Enabled = True End Sub