怎样让DLL生成的窗体不要老是呆在最前面?(50分)

  • 主题发起人 Restart1
  • 开始时间
R

Restart1

Unregistered / Unconfirmed
GUEST, unregistred user!
var
GetDll:THandle;
GetFunction:TFarProc;
begin
GetDll:=LoadLibrary('DLLChargeUp.dll');
if GetDll>32 then
begin
GetFunction:=GetProcAddress(GetDll,'ChargeUpNow');
if GetFunction<>nil then
TChargeUp(GetFunction)(application.Handle,PCharConnectStr); // 如果传入0,则生成非子窗体
end;
FreeLibrary(GetDll);
end;
我用这种方法来调用DLL生成窗体,结果窗体总在最前面,后面的主窗体都灰掉了!不把DLL的窗体关闭就
不得!怎么办?
 
你要把Application作為參數傳進去,然後把窗口設為子窗口
單傳一個 handle作不到這一點,我也在頭疼這個問題
但傳 Application 的話,要在兼容性作出犧牲,甚至Delphi5寫的Dll
在Delphi7的程序下都用不了,更不用說VC VB了
 
顶部