I have a menu bar like this.

Menu
.Item1
.Item2
.Item3

I need to use them like radio buttons. So i have come up with this. Seems a nasty hack since it loops all my menu items. And if i later add different checks it would interfear.


Any better solutions?

vb Code:
  1. Private Sub mnuMainMenuToolBarComposeExistingThread_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
  2.         Handles mnuMainMenuToolBarPrivateMessage.Click, mnuMainMenuToolBarComposeExistingThread.Click, _
  3.         mnuMainMenuToolBarComposeNewThread.Click
  4.  
  5.         For Each ctrl As ToolStripMenuItem In mnuMainMenuToolBar.Items
  6.             If Not ctrl.Name = DirectCast(sender, ToolStripMenuItem).Name Then
  7.                 CType(ctrl, ToolStripMenuItem).Checked = False
  8.             End If
  9.         Next ctrl
  10.  
  11.  
  12.     End Sub

(edit just realized this rewritten version is not even working)