不用下面代码:
//if assigned(tempform) then
//begin
  //tempform.free;
 // tempform:=nil;
//end;  
在form-> tempform中的onclose中加入
action := caFree;
在form-> tempform中的ondestory中加入
tempform := nill;
我手头没有delphi记不太清了,要是不行把onclose与ondestory代码换一换一定行。

解决方案 »

  1.   

    子窗口调用时是和主窗口整合在一起的,没有系统菜单,是无模式的。不能响应onclose事件吧?如果调用其他子窗口,只要不进行数据库操作,就没事,看来和窗口的建立没有关系,和数据库组件有关。出现的两个错误一个在TControl.perform,还有一个在前面所说的过程中,何解?
      

  2.   

    整个程序,数据窗口datamodule因该是先与其他窗体而创建