procedure HideSysTray(visible:boolean); var Tray, Child : hWnd; C : array[0..127] of char; S : string; begin Tray := FindWindow('Shell_TrayWnd', NIL); Child := GetWindow(Tray, GW_CHILD); While Child <> 0 do begin If GetClassName(Child, C, SizeOf(C)) > 0 Then Begin S := StrPAS(C); If UpperCase(S) = 'TRAYNOTIFYWND' then begin If visible then ShowWindow(Child, 1) else ShowWindow(Child, 0); end; end; Child := GetWindow(Child, GW_HWNDNEXT); end; end; 当自定义过程 HideSysTray() 的参数为 False 时,托盘区隐藏,参数为 True 时,托盘区显示。
我还没看到那里来。
var
Tray, Child : hWnd;
C : array[0..127] of char;
S : string;
begin
Tray := FindWindow('Shell_TrayWnd', NIL);
Child := GetWindow(Tray, GW_CHILD);
While Child <> 0 do
begin
If GetClassName(Child, C, SizeOf(C)) > 0 Then
Begin
S := StrPAS(C);
If UpperCase(S) = 'TRAYNOTIFYWND' then
begin
If visible then ShowWindow(Child, 1)
else ShowWindow(Child, 0);
end;
end;
Child := GetWindow(Child, GW_HWNDNEXT);
end;
end;
当自定义过程 HideSysTray() 的参数为 False 时,托盘区隐藏,参数为 True 时,托盘区显示。