menus act like radio buttons

The solution for “menus act like radio buttons” can be found here. The following code will assist you in solving the problem.

‘ Uncheck all menu items in this menu except checked_item.
Private Sub CheckMenuItem(ByVal mnu As ToolStripMenuItem, _
ByVal checked_item As ToolStripMenuItem)
‘ Uncheck the menu items except checked_item.
For Each item As ToolStripItem In mnu.DropDownItems
If (TypeOf item Is ToolStripMenuItem) Then
Dim menu_item As ToolStripMenuItem = _
DirectCast(item, ToolStripMenuItem)
menu_item.Checked = (menu_item Is checked_item)
End If
Next item
End Sub

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts