public static NativeMethods.WindowInfo GetWindowInfo(IntPtr hWnd) { var wi = new NativeMethods.WindowInfo(true); NativeMethods.GetWindowInfo(hWnd, ref wi); return(wi); }
public static bool IconsVisible() { var hWnd = NativeMethods.GetWindow(NativeMethods.GetWindow(new IntPtr(NativeMethods.FindWindow("Progman", "Program Manager")), NativeMethods.GetWindowCmd.GW_CHILD), NativeMethods.GetWindowCmd.GW_CHILD); NativeMethods.WindowInfo info = new NativeMethods.WindowInfo(); info.cbSize = (uint)Marshal.SizeOf(info); NativeMethods.GetWindowInfo(hWnd, ref info); return((info.dwStyle & 0x10000000) == 0x10000000); }