P
Piscesking
Unregistered / Unconfirmed
GUEST, unregistred user!
现在遇到一个问题,我在dll程序中创建了form,参数传出form.hadle.
但是主程序调用以后,Application.ComponentCount数量却没有增加,找不到这个dll创建的form,但是dll中用form.show又是能show出来的。
主程序:
procedure TFep_main_Frm.ShowWindow(hHandle: Integer);
var
i:integer;
hh:HWND;
begin
hh:=hHandle;
for i:=0 to Application.ComponentCount-1 do
begin
showmessage(application.Components.ClassName);
if Application.Components is TForm then
begin
if TForm(Application.Components).HANDLE=hh then
begin
ShowTshWindow(TForm(Application.Components),True)
end;
end;
end;
end;
但是主程序调用以后,Application.ComponentCount数量却没有增加,找不到这个dll创建的form,但是dll中用form.show又是能show出来的。
主程序:
procedure TFep_main_Frm.ShowWindow(hHandle: Integer);
var
i:integer;
hh:HWND;
begin
hh:=hHandle;
for i:=0 to Application.ComponentCount-1 do
begin
showmessage(application.Components.ClassName);
if Application.Components is TForm then
begin
if TForm(Application.Components).HANDLE=hh then
begin
ShowTshWindow(TForm(Application.Components),True)
end;
end;
end;
end;