Как минимизиpовать все запущеные окна
|
/* Hачало (MINIMIZE.DPR) {$APPTYPE CONSOLE} program Minimize; uses Windows,Messages; var Count:integer;
function EnumProc (WinHandle: HWnd; Param: LongInt): Boolean; stdcall; begin if (GetParent (WinHandle) = 0) and (not IsIconic (WinHandle)) and (IsWindowVisible (WinHandle)) then begin PostMessage (WinHandle, WM_SYSCOMMAND, SC_MINIMIZE, 0); Inc(Count); end; EnumProc := TRUE; end;
begin Count:=0; EnumWindows (@EnumProc, 0); Writeln('Minimized:',Count,' windows'); end. конец (MINIMIZE.DPR)*/ |