System Tray Application

Ask your PowerShell-related questions, including questions on cmdlet development!
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 2 years and 10 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
jdainsworth
Posts: 25
Last visit: Thu Dec 14, 2023 9:10 am

System Tray Application

Post by jdainsworth »

I am working on a System Tray Application that i am developing in PowerShell Studio. I would like to execute some cleanup code if someone clicks on the exit menu item. I was hoping i might be able to do it with a powershell.exiting event, but that event doesn't appear to fire.

Any advice on that?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: System Tray Application

Post by jvierra »

Use a project and package it then use the Application_Exit event to do the cleanup or just place the code after the call to the main form.
MadeleineBailey
Posts: 1
Last visit: Wed May 12, 2021 5:32 am

Re: System Tray Application

Post by MadeleineBailey »

Txh for answer, It helped!
This topic is 2 years and 10 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