|
-
May 18th, 2005, 11:35 PM
#1
Thread Starter
Frenzied Member
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.
Last edited by blindlizard; May 19th, 2005 at 02:57 AM.
Reason: Resolved
-
May 19th, 2005, 01:10 AM
#2
New Member
Re: ContextMenu default item
Yes
set the MenuItem.DefualtItem property to True for the menu item you want.
-
May 19th, 2005, 02:56 AM
#3
Thread Starter
Frenzied Member
Re: ContextMenu default item
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|