mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
how to open only single instance of electronnet exe #523
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jadhavrani123 on GitHub (Jun 27, 2020).
Originally assigned to: @GregorBiswanger on GitHub.
Hello Sir,
I am trying to open only one instance of app window.I am setting option in electron.manifest.json file singleinstance=true,
It works but when my exe is in system tray it doesnt get open when click on exe icon.I want your help for that problem.Means when I click on exe icon the same window should get open which is in system tray.
@ThuCommix commented on GitHub (Sep 1, 2020):
You can pass a delegate to Electron.App.RequestSingleInstanceLockAsync which will get called with the arguments (if any) of the new opened instance. In that delegate you need to restore the focus & visibility of your desired window.
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!