3

how to detect all windows(of other applications) minimized from c# application

Suriyan Suresh
  • 2,964
  • 14
  • 51
  • 80

4 Answers4

5

Use example from here http://pinvoke.net/default.aspx/user32.EnumDesktopWindows then just check window state

alemjerus
  • 8,023
  • 3
  • 32
  • 40
  • This answer was very useful, thanks. But I'll just point out that linking to examples on PInvoke.net can be problematic - that particular example has edited five times since this answer was posted here at SO, and it looks very different now than it did then. Furtunately, you can see the old versions on PInvoke.net. Anyway, the current version seems to work fine, so thanks again. – RenniePet Jan 19 '14 at 15:23
1

If you want to monitor what's going on in the system, then you want to set up a CBT Hook. That will keep you notified when windows are created, destroyed, minimized, maximized, moved, activated, etc etc.

Dan Byström
  • 9,067
  • 5
  • 38
  • 68
0

Use GetWindowState() WinAPI function

oldUser
  • 243
  • 2
  • 12
-1

For Windows Forms you can look at the property WindowState on the Form object. Minimized windows will have a state of FormWindowState.Minimized.

James Bloomer
  • 5,212
  • 2
  • 22
  • 23