Hello, I would like to create an application that alerts me of changes done on my server. I want the application to always close/be in my system tray even when I press the close button and I also want it to display a small pop-up window when a notification happens. Could anyone point me in the direction of decent .dlls or native code that could allow this to happen?
I want my app to minimize into here:
Here it is, a way to add a system tray icon : Creating a System Tray Application with C# | ...
You can completely hide the application with -batchmode (https://forum.unity3d.com/threads/impossible-to-start-a-game-as-a-windows-service.67398/)… keep digging
Here is a way to convert Texture2D to Icon (from Registers Unity's Texture2D as an icon of System.Windows.Fomrs.Notifyicon (requires mono dll) · GitHub), usefull since System.Drawing.Icon.ExtractAssociatedIcon didn’t work for me
public System.Drawing.Icon ConvertTextureToIcon(Texture2D iconTexture)
{
System.IO.MemoryStream memStream = new System.IO.MemoryStream(iconTexture.EncodeToPNG());
memStream.Seek(0, System.IO.SeekOrigin.Begin);
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(memStream);
return System.Drawing.Icon.FromHandle(bitmap.GetHicon());
}