![]() |
|
|
|
|
#1
|
||||
|
||||
|
Код:
function EnumMiniProc (Wd: HWnd; Param: LongInt): Boolean; stdcall; // Обязательно stdcall !!! Begin If Wd<>Form1.Handle then If IsWindowVisible(WD) then If not IsIconic(WD) then If isWindow(WD) then ShowWindow(WD, SW_hide); EnumMiniProc:= TRUE; end; procedure TForm1.Button1Click(Sender: TObject); begin EnumWindows (@EnumMiniProc, 0); end; скрываю все видимые окна.. делаю тоже самое чтобы показать окна... Код:
function EnumMaxProc (Wd: HWnd; Param: LongInt): Boolean; stdcall; // Обязательно stdcall !!! Begin If Wd<>Form1.Handle then If IsWindowVisible(WD) then If not IsIconic(WD) then If isWindow(WD) then ShowWindow(WD, SW_hide); EnummaxProc:= TRUE; end; procedure TForm1.Button2Click(Sender: TObject); begin EnumWindows (@EnumMaxProc, 0); end; (((показывает все окна даже которые небыли видны до скрытия окн... выводит все окна... как сделать чтобы показать окна которые были видны до их скрытия... а остальные не трогать ![]() |
|
#2
|
||||
|
||||
|
запоминать открытые окна же
Код:
var HiddenWnd:array of HWND;
...
function EnumMiniProc (Wd: HWnd; Param: LongInt): Boolean; stdcall;
Begin
If Wd<>Form1.Handle and isWindow(WD) and IsWindowVisible(WD) and not IsIconic(WD) then
begin
SetLength(HiddenWnd, Length(HiddenWnd)+1);
HiddenWnd[High(HiddenWnd)]:=WD;
ShowWindow(WD, SW_hide);
end;
EnumMiniProc:= TRUE;
end; |
|
#3
|
||||
|
||||
|
тогда уж SW_SHOW для запомненых вызывать
![]() |
|
#4
|
||||
|
||||
|
спасибо! думал я правильно (что окна запоминать надо) но незнал как записать
![]() |
|
#5
|
||||
|
||||
|
Цитата:
![]() |