Hi,
I would like to have an icon in systray for my project.
When clicked on the icon the form should appear, when clicked again it should dissapear.
I'd hope also it would be possible to not have the form minimized in taskbar: just the icon, click on it and the form is there, click again and it is gone (but systray icon stays there).
Tried to make the project into an exe, then not output form but systray. It works, but I cannot make any action happen when I click on the icon in the systray icon.
Hope this is clear.
Thanks for your help!
S
Systray icon: click to open form?
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.
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.
Re: Systray icon: click to open form?
Setting your form's ShowInTaskbar property set to false should prevent it from being shown on the taskbar.
You may find the following helpful:
https://www.sapien.com/blog/2019/01/10/ ... lications/
https://www.sapien.com/blog/2017/07/10/ ... owershell/
You may find the following helpful:
https://www.sapien.com/blog/2019/01/10/ ... lications/
https://www.sapien.com/blog/2017/07/10/ ... owershell/
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Systray icon: click to open form?
Created a sample form in att..
-It works fine but "hide in taskbar" still shows a minimized window in left corner.
-2 icons or show at startup ...
-I'd like to set extra menuitem which says "disable/enable at startup" but default it should start at windows startup. How can I do this?
Thanks!
-Update
I keep on getting errors uploading the zip file, so I post hereby the OneDrive location
https://1drv.ms/u/s!AuBjpW9I3NC4mt1fTNq ... Q?e=O2xr0q
-It works fine but "hide in taskbar" still shows a minimized window in left corner.
-2 icons or show at startup ...
-I'd like to set extra menuitem which says "disable/enable at startup" but default it should start at windows startup. How can I do this?
Thanks!
-Update
I keep on getting errors uploading the zip file, so I post hereby the OneDrive location
https://1drv.ms/u/s!AuBjpW9I3NC4mt1fTNq ... Q?e=O2xr0q
Re: Systray icon: click to open form?
[Topic moved to PowerShell GUIs forum by moderator]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Systray icon: click to open form?
From your script, you have created a context menu includes the "disable/enable at startup", but you have not set it with your NotifyIcon object or manually open it anywhere.
I recommend trying to hide the form rather than minimize.
I recommend trying to hide the form rather than minimize.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.