本文整理自网络,侵删。
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 xe5的新功能“ tlistview内置搜索过滤”
python4Delphi 示例应用程序在 Delphi 应用程序中运行简单的 python 脚本
winapi 字符及字符串函数(7): ischarlower - 是否是个小写字母
更多相关阅读请进入《Delphi》频道 >>