procedure TForm1.Button1Click(Sender: TObject);
var
hDesktop : THandle;
begin
if ChkBox2.Checked then
begin
hDesktop := FindWindow('Progman', nil);
ShowWindow(hDesktop, SW_HIDE);//隐藏
end
else
begin
hDesktop := FindWindow('Progman', nil);
ShowWindow(hDesktop, SW_Normal);//显示
end;
end;
我刚试过,没问题