var i:integer; begin for i:=0 to application.ComponentCount-1 do if (application.Components[i] is Tform) then showmessage(Tform(application.Components[i]).Caption);
for i:=0 to ComponentCount-1 do begin if Components[i] is TForm then ... end;不知道可以不?我这里没有delphi
var i:integer; begin for i:=0 to Screen.FormCount-1 do begin ShowMessage(Screen.Forms[i].Caption); end;
to : jinjazz(近身剪(N-P攻略)) procedure TForm1.Button2Click(Sender: TObject); begin Form2:=TForm2.Create(nil); form2.Show; end; 这种情况你的代码就找不到form2了只要窗体不释放, gemouzhi(gemouzhi) 的代码可以找到form2
begin
for i:=0 to application.ComponentCount-1 do
if (application.Components[i] is Tform) then
showmessage(Tform(application.Components[i]).Caption);
begin
if Components[i] is TForm then
...
end;不知道可以不?我这里没有delphi
i:integer;
begin
for i:=0 to Screen.FormCount-1 do
begin
ShowMessage(Screen.Forms[i].Caption);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Form2:=TForm2.Create(nil);
form2.Show;
end;
这种情况你的代码就找不到form2了只要窗体不释放, gemouzhi(gemouzhi) 的代码可以找到form2
Form2:=TForm2.Create(application);还是screen的好