procedure TCustomForm.Hide;
begin
Visible := False;
end;procedure TCustomForm.SetVisible(Value: Boolean);
begin
if fsCreating in FFormState then
if Value then
Include(FFormState, fsVisible) else
Exclude(FFormState, fsVisible)
else
begin
if Value and (Visible <> Value) then SetWindowToMonitor;
inherited Visible := Value;
end;
end;上面这个hide方法执行之后怎么会去掉用SetVisible这个方法啊??? hide方法里并没有调用啊????
我迷惑很长时间了...
begin
Visible := False;
end;procedure TCustomForm.SetVisible(Value: Boolean);
begin
if fsCreating in FFormState then
if Value then
Include(FFormState, fsVisible) else
Exclude(FFormState, fsVisible)
else
begin
if Value and (Visible <> Value) then SetWindowToMonitor;
inherited Visible := Value;
end;
end;上面这个hide方法执行之后怎么会去掉用SetVisible这个方法啊??? hide方法里并没有调用啊????
我迷惑很长时间了...
DefPenData: TPenData = (
Handle: 0;
Color: clBlack;
Width: 1;
Style: psSolid);
这个const加在这里算是做什么的啊????
procedure SetData(const PenData: TPenData);
这两个方法是TPen里面的方法;
为什么GetDate要把它设置成var
SetDate要设置成Const呢????
const 表示参数不能被修改这些问题太基础了,建议看看《Delphi精要》。
const 在编译开关{$c+}打开时,初始化一次就可以了。类似于 以c++ 中的Static。
const 表示参数不能被修改