Ahoj, tak si hraju a zkouším prográmek co po kliknutí na tlačítko minimalizuje všechny okna. Asi chápete kdy se to může hodit :D No nefunguje na systémová okna (průzkumník windows apod.). Nevíte jak to jde spravit?
Private Declare Function ShowWindow Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal nCmdShow As SHOW_WINDOW _
) As Boolean
<Flags()> _
Private Enum SHOW_WINDOW As Integer
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
SW_MAX = 11
End Enum
.
.
.
For Each p As Process In Process.GetProcesses()
ShowWindow(p.MainWindowHandle, SHOW_WINDOW.SW_MINIMIZE)
Next
|