public static bool IsMinimized(IntPtr handle) { int style = User32Interop.GetWindowLong(handle, GWL_STYLE); return ((style & WindowStyleFlags.WS_MINIMIZE) == WindowStyleFlags.WS_MINIMIZE); }