在DELPHI环境下今天发现Screen. 后面不出了,语法检查说以下的语句中:if Screen.ActiveForm.Name='frmmain' then  //是主窗,要看是不是退出。
if screen.ActiveForm.Name=f.Name then     //当前窗口是需要关闭的窗口,则关掉它。编译错误信息是:Object or class type required

解决方案 »

  1.   

    唉,自己找到原因了,大家学点经验吧:interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
      Dialogs, ExtCtrls, StdCtrls,jpeg, Buttons, LMDCustomComponent,
      LMDSysInfo, Menus, ActnMan, ActnColorMaps, XPMan, DLL_frameCMD,
      LMDControl, LMDBaseControl, LMDBaseGraphicControl, LMDGraphicControl,
      LMDScrollText, JustOne2, GetApplicationVer, LMDCustomHint,
      LMDCustomShapeHint, LMDShapeHint, OleServer, AccessXP,
      //奇怪:下面的forms放在原来的第一行最后原始位置就不对。放最后好了。
      //原来没有 oldserver,AccessXP,时正常。可能是这两个搞的鬼,真是奇怪。 2003.8.9
      Forms;type
      Tfrmmain = class(TForm)