attribute.~pas
来自「这是一个间歇的小唾弃,希望大家希望,以后大家多学习,多多交流共同进步!」· ~PAS 代码 · 共 45 行
~PAS
45 行
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 + =
减小字号Ctrl + -
显示快捷键?