Answers for "menus act like radio buttons vb.net"

VBA
0

menus act like radio buttons vb.net

' 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
Posted by: Guest on June-13-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language