本文整理自网络,侵删。
delphi 如何设置文件属性
procedure TForm1.Button1Click(Sender: TObject);
begin
with OpenDialog1 do
if Execute then
if SetFileAttributes(PChar(Filename), FILE_ATTRIBUTE_HIDDEN) then
Caption:='attribute was changed'
else
Caption:='attribute was not changed';
end;
相关阅读 >>
Delphi winapi: getfocus - 获取当前拥有焦点的窗口的句柄
Delphi winapi: movewindow - 改变窗口的位置与大小
Delphi adoconnection1 连接excel表格读取数据
Delphi 遍历所有目录和子目录下的文件名(可按后缀名遍历)
更多相关阅读请进入《Delphi》频道 >>