“蓝拉贾”的对策是答案,你可以采取几种方式,这里有两个方面:
首先:
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
ToolStripButton2.Checked = ToolStripButton1.Checked
Do whatever you want with your buttons
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
ToolStripButton1.Checked = ToolStripButton2.Checked
Do whatever you want with your buttons
End Sub
另一种做法:
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Do whatever you want with your buttons
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
Do whatever you want with your buttons
End Sub
Private Sub ToolStripButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.CheckedChanged
ToolStripButton2.Checked = ToolStripButton1.Checked
End Sub
Private Sub ToolStripButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.CheckedChanged
ToolStripButton1.Checked = ToolStripButton2.Checked
End Sub
我很显然赞成第一点。