procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
0Abegin
if button1.enabled then CanClose := true
else CanClose := false; //如果不可用就不能退出
end;—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
—————————————————————————————————
0Abegin
if button1.enabled then CanClose := true
else CanClose := false; //如果不可用就不能退出
end;—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
—————————————————————————————————
var CanClose: Boolean);
begin
if button1.enabled then
CanClose:=true;
else
CanClose:=false;
begin
CanClose := button1.enabled ; //如果不可用就不能退出
end;
begin
end和
if button1.enabled then
begin
end
为什么 不行?》
begin
end和
if button1.enabled then
begin
end
为什么 不行?》
因为True是什么呀?逻辑变量不能这样用!真和假是比较的结果!