/// <summary> /// A kick for the MILCORE to query for the display settings again, this time with our improved data. /// </summary> private static void Execute_InvalidateMil() { // Send an update to all the top-level windows on our thread Win32Declarations.EnumWindows(delegate(IntPtr hWnd, IntPtr lParam) { int dwDummy; if (Win32Declarations.GetWindowThreadProcessId(hWnd, out dwDummy) == Kernel32Dll.GetCurrentThreadId()) { User32Dll.Helpers.SendMessageW(hWnd, WindowsMessages.WM_SETTINGCHANGE, (IntPtr)Win32Declarations.SPI_SETFONTSMOOTHING, IntPtr.Zero); User32Dll.Helpers.SendMessageW(hWnd, WindowsMessages.WM_SETTINGCHANGE, (IntPtr)Win32Declarations.SPI_SETFONTSMOOTHINGTYPE, IntPtr.Zero); } return(true); // Go on }, 0); }