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.
Locked
User avatar
disaak
Posts: 1
Joined: Sun Mar 03, 2013 12:38 pm

Accessing Items Added to the System Menu

Post by disaak » Mon Apr 08, 2019 12:59 pm

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: 13891
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Accessing Items Added to the System Menu

Post by jvierra » Mon Apr 08, 2019 1:58 pm

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.

Locked