public Taskbar(IntPtr hwnd) { HWND = hwnd; Monitor = Externals.MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); AccentPolicy = new AccentPolicy(); FindMaximizedWindowsHere(); }
public void FindMaximizedWindowsHere() { bool isInThisScreen = false; IntPtr thisAppMonitor; foreach (IntPtr hwnd in Globals.MaximizedWindows) { thisAppMonitor = Externals.MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); if (Monitor == thisAppMonitor) { isInThisScreen = true; } } HasMaximizedWindow = isInThisScreen; return; }