CnPack Forum


 
Subject: 窗体列表的Bug?
softsword
普通灌水员
Rank: 2



Medal No.1  
UID 452
Digest Posts 0
Credits 95
Posts 95
点点分 95
Reading Access 10
Registered 2004-7-13
Location 北京
Status Offline
Post at 2005-4-12 21:03  Profile | Blog | P.M. 
窗体列表的Bug?

为什么窗体列表里面还有这些??
一个是使用的单元文件,一个是声明的TIcon变量,用于载入图标,都是在工程文件里面写的。
请斑竹看看,谢谢!


Image Attachment: Snap1.jpg (2005-4-12 21:03, 53.47 K)

Top
zjy
管理员
Rank: 9Rank: 9Rank: 9



UID 2
Digest Posts 6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
Post at 2005-4-12 21:09  Profile | Site | Blog | P.M. 
窗体列表是从 OTA 的工程模块信息接口里读的,你试试看 delphi 自己的窗体列表里有没有这些东西?估计是你的 dpr 代码让 IDE 误解了,能否帖上来看看?




Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
Top
softsword
普通灌水员
Rank: 2



Medal No.1  
UID 452
Digest Posts 0
Credits 95
Posts 95
点点分 95
Reading Access 10
Registered 2004-7-13
Location 北京
Status Offline
Post at 2005-4-13 09:55  Profile | Blog | P.M. 
program dprUpdate;

uses
  Forms,
  Graphics {TIcon},
  Windows {LoadIcon},
  UntMain in 'UntMain.pas' {FrmMainIDE},
  Functions in 'Functions.pas' {Functions, not form};

{$R *.res}
{$R resUpdate.RES}

var
  icoAppMain: TIcon;
const
  AppTitle = 'CnPack Form List Test';
begin
  
  Application.Initialize;
  Application.Title := 'CnPack Form List Test';
  try
    icoAppMain := TIcon.Create;
    icoAppMain.Handle := LoadIcon(HInstance,'ICON_MAIN');
    Application.Icon := icoAppMain;
  except
    MessageBox(0, PChar('错误:为应用程序分配图标时发生异常! '),
      PChar(AppTitle), MB_OK + MB_ICONSTOP);
  end;
   
  try
    Application.CreateForm(TFrmMainIDE, FrmMainIDE);
  except
    MessageBox(0, PChar('错误:创建应用程序主窗体时发生异常! '),
      PChar(AppTitle), MB_OK + MB_ICONSTOP);
  end;

  Application.Run;

end.
Top
softsword
普通灌水员
Rank: 2



Medal No.1  
UID 452
Digest Posts 0
Credits 95
Posts 95
点点分 95
Reading Access 10
Registered 2004-7-13
Location 北京
Status Offline
Post at 2005-4-13 09:57  Profile | Blog | P.M. 
请 yygw 帮忙看看,谢谢!
Top
zjy
管理员
Rank: 9Rank: 9Rank: 9



UID 2
Digest Posts 6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
Post at 2005-4-13 10:16  Profile | Site | Blog | P.M. 
uses
  Forms,
  Graphics {TIcon},
  Windows {LoadIcon},
  UntMain in 'UntMain.pas' {FrmMainIDE},
  Functions in 'Functions.pas' {Functions, not form};

问题就出在这个 dpr 的 uses 部分,delphi 会把窗体类名放在单元名后面的注释中,前面的代码让 IDE 误解了,把那些不是自动生成的注释去掉就行了。

dpr 文件有不少内容都是 ide 自动维护的,修改时要特别注意。uses 部分尽量不要手工修改,如果在这里面用条件编译,在 ide 中打开时也可能出问题的。




Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
Top
softsword
普通灌水员
Rank: 2



Medal No.1  
UID 452
Digest Posts 0
Credits 95
Posts 95
点点分 95
Reading Access 10
Registered 2004-7-13
Location 北京
Status Offline
Post at 2005-4-13 13:42  Profile | Blog | P.M. 
哈哈,太对了,改了马上就好了!
本来是想自己以后看得更清楚,没想到弄巧成拙, 嘿嘿
谢谢 yygw !
Top
 




All times are GMT++8, the time now is 2024-11-26 09:05

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.033901 second(s), 10 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP