📄 attribute.~pas
字号:
unit Attribute;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TfrmAttibute = class(TForm)
chkSysFile: TCheckBox;
chkOnlyReadFile: TCheckBox;
chkArchiveFile: TCheckBox;
chkHideFile: TCheckBox;
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmAttibute: TfrmAttibute;
implementation
uses TestMain;
{$R *.DFM}
procedure TfrmAttibute.FormActivate(Sender: TObject);
var
AttibuteStr:Word;
begin
AttibuteStr:= FileGetAttr(frmMain.FileListBox.FileName ); //得到文件属性
chkSysFile.Checked :=(AttibuteStr and faSysfile)=faSysfile;
chkOnlyReadFile.Checked :=(AttibuteStr and faReadOnly)=faReadOnly;
chkArchiveFile.Checked :=(AttibuteStr and faArchive)= faArchive;
chkHideFile.Checked :=(AttibuteStr and faHidden)=faHidden;
//运行相关操作
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -