ShowWindow 隐藏 显示任务栏

{隐藏任务栏}
procedure TForm1.Button1Click(Sender: TObject);
var
    wndHandle : THandle;
    wndClass : array [ 0 .. 50] of Char;
begin
    StrPCopy(@wndClass[ 0], 'Shell_TrayWnd');
    wndHandle :=FindWindow(@wndClass[ 0], nil);
    ShowWindow(wndHandle, SW_HIDE);
end;

{显示任务栏}
procedure TForm1.Button2Click(Sender: TObject);
var
    wndHandle : THandle;
    wndClass : array [ 0 .. 50] of Char;
begin
    StrPCopy(@wndClass[ 0], 'Shell_TrayWnd');
    wndHandle :=FindWindow(@wndClass[ 0], nil);
    ShowWindow(wndHandle, SW_RESTORE);
end;




你可能感兴趣的:(window)