diff ServerMonitor/Win32Helpers.cs @ 8:052aa62cb42a

Single instance. Add autorun option. Add icons. General enhancements.
author Brad Greco <brad@bgreco.net>
date Sat, 09 Mar 2019 20:14:03 -0500
parents 3142e52cbe69
children 68d7834dc28e
line wrap: on
line diff
--- a/ServerMonitor/Win32Helpers.cs	Fri Mar 01 21:39:22 2019 -0500
+++ b/ServerMonitor/Win32Helpers.cs	Sat Mar 09 20:14:03 2019 -0500
@@ -24,6 +24,13 @@
             public UInt32 dwTimeout;
         }
 
+        public const int HWND_BROADCAST = 0xffff;
+        public static readonly int WM_SHOWMONITOR = RegisterWindowMessage("WM_SHOWMONITOR");
+        [DllImport("user32")]
+        public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam);
+        [DllImport("user32")]
+        public static extern int RegisterWindowMessage(string message);
+
         public enum FlashWindowFlags : uint
         {
             /// <summary>