Accessing Items Added to the System Menu

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
disaak
Posts: 1
Last visit: Fri Oct 30, 2020 8:08 am

Accessing Items Added to the System Menu

Post by disaak »

I have been able to add an item to the system menu (the menu that appears when you right-click on the upper left of a window) of a window however I have not been able to find a way to make use of it with PowerShell.

How can trap the event to run a function based on the item's ID when it is selected from the system menu?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Accessing Items Added to the System Menu

Post by jvierra »

The system menu events are only available to the system. They are not passed to the client window hence the name "system menu". Add a menu bar to your form and all items and events will be available.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked