⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attribute.~pas

📁 这是一个间歇的小唾弃,希望大家希望,以后大家多学习,多多交流共同进步!
💻 ~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 + -