chromelyapps / Chromely

Build Cross Platform HTML Desktop Apps on .NET using native GUI, HTML5, JavaScript, CSS, Owin, AspNetCore (MVC, RazorPages, Blazor)
MIT License
2.98k stars 280 forks source link

How to minimize Chromely app to the taskbar? #341

Closed lisenz closed 2 years ago

lisenz commented 2 years ago

How to minimize Chromely app to the taskbar? like this: image

mattkol commented 2 years ago

@lisenz If you expose the MIn button, I think it should work without you doing anything. Attached is a demo for Windows.

image ReloadDemo.zip

lisenz commented 2 years ago

@mattkol hi,Thank you for your answer,but this is not the result I want. There are two areas on my system,like this: image

When the Chromely app is closed or minimized, I want to appear in the no.2 area(the notification area)

mattkol commented 2 years ago

@lisenz oh I see ... That is not available out of the box. You need to add notification icon.

If it is something you want to take a stab at, there is more information here: Notifications and the Notification https://docs.microsoft.com/en-us/windows/win32/shell/notification-area#add-a-notification-icon

Some simple console sample is here .. https://stackoverflow.com/questions/64338812/show-balloon-popup-via-winapi32

More info https://docs.microsoft.com/en-us/windows/win32/shell/samples-notificationicon https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/Win7Samples/winui/shell/appshellintegration/NotificationIcon/NotificationIcon.cpp

To hook into Chromely, you can use this as guide: https://github.com/chromelyapps/Chromely/issues/235