@"von"#p7
Hi, if you are talking about using the tray only without showing the window case there are various ways to use and implement it.
Two uses are mentioned below
- Use in windows
lcl+cef
The web tray, in this case the main window is required to be created and initialized, currently energy is initialized with a number of necessary functions, thuslcl+cef
Web trays need these features.
In practice, if you have a deep understanding of the framework, you can leave the main window behind and implement it yourself using only the web tray alone.
Current solution: When the main window is initialized, set its x and y coordinates to off-screen and hide it after creation, e.g. if the window size is 800x600, x=-800, y=-600. - Pure native lcl system tray in the
Setting the main window to be hidden within a callback function
(false)
At this point, if you exit the application's defaultclose
maybeCloseBrowserWindow
function will not work. It is necessary to call the()
Exit the application
If you implement it yourself under windowslcl+cef
Tray and only tray functions.
Make the main window a tray page. At this point you may need to set the default hiding of windows as required.
Then create the lcl native tray, manage the main window in the tray function events, control the tray to show and hide and so on, you can refer to thelclcef
Tray implementation source code.