ContextMenu default item [resolved]
I have a system try icon with a ContextMenu like this:
VB Code:
mContextMenu.MenuItems.Add(New MenuItem("Stop", New EventHandler(AddressOf StopService)))
mContextMenu.MenuItems.Add(New MenuItem("Pause", New EventHandler(AddressOf PauseService)))
mContextMenu.MenuItems.Add(New MenuItem("Continue", New EventHandler(AddressOf ContinueService)))
mContextMenu.MenuItems.Add(New MenuItem("Start", New EventHandler(AddressOf StartService)))
mContextMenu.MenuItems.Add("-")
mContextMenu.MenuItems.Add(New MenuItem("About", New EventHandler(AddressOf AboutBox)))
mContextMenu.MenuItems.Add(New MenuItem("Exit", New EventHandler(AddressOf ExitController)))
mNotifyIcon.ContextMenu = mContextMenu
Is there a way to have a default item in the context menu and show it bold? Basically, when the user right clicks on the icon, the menu comes up. I want the first item bold which when clicked does the same thing as double clicking the icon. You know, the standard way most system tray icons perform.
Re: ContextMenu default item
Yes
set the MenuItem.DefualtItem property to True for the menu item you want.
Re: ContextMenu default item