1 function SetTaskBar(LVisible: Boolean): Boolean; //隐藏-显示任务条
2 var
3 h: THandle;
4 begin
5 if LVisible then
6 begin
7 h:=FindWindow('Shell_TrayWnd',nil);
8 ShowWindow(h, SW_SHOW); //隐藏任务条
9 end
10 else
11 begin
12 h:=FindWindow('Shell_TrayWnd',nil);
13 ShowWindow(h,SW_HIDE); //显示任务条
14 end;
15 Result:=true;
16 end;
2 var
3 h: THandle;
4 begin
5 if LVisible then
6 begin
7 h:=FindWindow('Shell_TrayWnd',nil);
8 ShowWindow(h, SW_SHOW); //隐藏任务条
9 end
10 else
11 begin
12 h:=FindWindow('Shell_TrayWnd',nil);
13 ShowWindow(h,SW_HIDE); //显示任务条
14 end;
15 Result:=true;
16 end;