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.
User avatar
Posts: 1
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Sun Mar 03, 2013 12:38 pm

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?

Posts: 14444
Joined: Tue May 22, 2007 9:57 am

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.