复制代码uses FileCtrl; procedure TForm1.BitBtn1Click(Sender: TObject);begin with OpenDialog1 do if Execute then if FileSetAttr(filename, faArchive)=0 then Caption:='attribute was changed' else Caption:='attribute was not changed';end;复制代码 请在interface下的us