📄 unit2.pas.~6~
字号:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Borland.Vcl.StdCtrls, System.ComponentModel;
type
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
Button1: TButton;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2:TForm2;
implementation
{$R *.nfm}
procedure TForm2.Button1Click(Sender: TObject);
var
attr:word;
begin
attr:= FileGetAttr(Label2.Caption);
if CheckBox1.Checked then
attr:=attr or faReadOnly
else
attr:=attr and not faReadOnly;
if CheckBox2.Checked then
attr:=attr or faHidden
Else
attr:=attr and not faHidden;
FileSetAttr(Label2.Caption,attr);
Self.close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -