I made a form in PS Studio with a notify icon and a contextmenustrip for that icon.
The notify icon does nothing more than stay in the system tray in the taskbar and when you right click it give you options to run other scripts. Its like a script hub.
My issue is when I right click it the contextmenustrip appears to the left of the mouse instead of to the right of the mouse like all other contextmenus in other notifyicons like battery and wifi and stuff.
This isn't the biggest issue but because I put my taskbar on the left side of my monitor, the contextmenu appears on my second monitor (to the left of my main one).
Is there a way to make it act like the other contextmenus?
As a workaround I was able to assign the left click to $contextmenustrip.Show() but then the contextmenustrip doesn't disappear when you click elsewhere and it loses focus.
Any help is appreciated!
NotifyIcon + ContextMenuStrip
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 forum is a space to discuss coding involving Graphical User Interfaces (GUI) in PowerShell or using WinForms controls, and technical issues related to development.
- Question about a licensed SAPIEN product? Post here: Product Support for Registered Users
- Question about a trial SAPIEN product? Post here: Former and Future Customers - Questions
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 forum is a space to discuss coding involving Graphical User Interfaces (GUI) in PowerShell or using WinForms controls, and technical issues related to development.
- Question about a licensed SAPIEN product? Post here: Product Support for Registered Users
- Question about a trial SAPIEN product? Post here: Former and Future Customers - Questions