编写一过程,改变参数显示指定PC: procedure ShowPC(I:integer); begin if i=1 then begin p1.visible:=true; p2.visible:=false; p3.visible:=false; end; if i=2 then begin p2.visible:=true; p1.visible:=false; p3.visible:=false; end; if i=3 then begin p3.visible:=true; p2.visible:=false; p1.visible:=false; end; end;
运行时,也有bringtofront的方法
希望这样?
pc.visible:=true;
pb.visible:=false;
pa.visible:=false;
procedure ShowPC(I:integer);
begin
if i=1 then
begin
p1.visible:=true;
p2.visible:=false;
p3.visible:=false;
end;
if i=2 then
begin
p2.visible:=true;
p1.visible:=false;
p3.visible:=false;
end;
if i=3 then
begin
p3.visible:=true;
p2.visible:=false;
p1.visible:=false;
end;
end;