看一个函数的声明。有一个参数到底是什么类型?
procedure OpenForm(FormClass: TFormClass; var fm; AOwner:TComponent);
var
i: integer;
Child:TForm;
begin
for i := 0 to Screen.FormCount -1 do
if Screen.Forms[i].ClassType=FormClass then
begin
Child:=Screen.Forms[i];
if Child.WindowState=wsMinimized then
ShowWindow(Child.handle,SW_SHOWNORMAL)
else
ShowWindow(Child.handle,SW_SHOWNA);
if (not Child.Visible) then Child.Visible:=True;
Child.BringToFront;
Child.Setfocus;
TForm(fm):=Child;
exit;
end;
Child:=TForm(FormClass.NewInstance);
TForm(fm):=Child;
Child.Create(AOwner);
end;
调用是OpenForm(Tfrm_YQ_Lab,frm_YQ_Lab, self);
我知道这个程序的作用,就是不知道
procedure OpenForm(FormClass: TFormClass; var fm; AOwner:TComponent);
中的fm是什么类型?也就是如果参数不定义类型是什么类型的问题?