dsgnintf.dcu 找不到的解决方案

samool 发布暂无评论11363 阅读

AI摘要

文章介绍了在Delphi 5下开发的控件如何在Delphi 6和7下使用,需要添加lib文件、修改源文件中的uses部分,并加入搜索路径。提供了两种解决方法,第一种是修改dpk文件和pas源文件,第二种是直接修改Delphi源文件,将Proxies单元从DesignEditors单元中剔除。

d5下开发的大多数控件都是从tcomponenteditor派生的
对于在d5开发的从tcomponenteditor派生的控件,要到d6下使用,需要经过以下
几个步骤:
1、添加 lib\designide.dcp到控件的dpk文件的requires部分
2、在控件的pas源文件中凡是uses dsgnintf的地方改成uses designintf, designeditors

3.加入搜索路径
C:\Program Files\Borland\Delphi7\Source\ToolsAPI

偶测试成功, 下面还有一种方法(来至大富翁论坛), 测试失败.

---------------------------------------------------------------------------------------------------

这个问题是D6及D7才有的,原因及解决方法如下文(英文站点,看晕了)
http://community.borland.com/article/0,1410,27717,00.html
 
不改包,直接改Delphi源文件的解决方法:(我是这样改的,没有出什么问题)
1.加入搜索路径
C:\Program Files\Borland\Delphi7\Source\ToolsAPI
2.打开
C:\Program Files\Borland\Delphi7\Source\ToolsAPI\DesignEditors.pas
3.找到并把
uses
  Types, SysUtils, Classes, TypInfo, Variants, DesignIntf, DesignMenus,Proxies;
改为
uses
  Types, SysUtils, Classes, TypInfo, Variants, DesignIntf, DesignMenus{,Proxies};
4.找到并把
      if (FAncestor = nil) and (Component <> Designer.Root)
        and IsProxyClass(Component.ClassType) then
改为
      if (FAncestor = nil) and (Component <> Designer.Root)
        {and IsProxyClass(Component.ClassType)} then
5.找到并把
  while IsProxyClass(ComponentClass) do
改为
  //while IsProxyClass(ComponentClass) do
6.保存,编译运行,OK

上面3.4.5.就是把Proxies单元从DesignEditors单元中剔除,DesignEditors单元
中只有两个地方引用了Proxies单元的函数,而且是同一个函数:IsProxyClass,把
这两个地方注释掉就可以了.



proxies.pas

  1. 01SaMDeditor V2.4 更新内容2026-12-02
  2. 02恭喜《轻武爱学习》小程序备案成功!2026-11-24
  3. 03SaView 图阅 1.1.1 更新日志2026-11-18
  4. 04Book2EPUB 1.0.4 更新日志2026-11-18
  5. 05SaView 图阅 一款轻便纯粹的看图工具2026-11-16
  6. 06免费工具Book2EPUB:轻松将电子书转换为 EPUB2026-11-11
  7. 07SaBlog2026 主题功能介绍(v1.1.36)2026-10-26
  8. 08PHP2Shell 重大安全漏洞事件深度分析报告2026-10-23
  9. 09LiteLLM v1.106.0 更新内容总结2026-10-20
  10. 10AI Native 受控软件工程2026-10-12
COMMENTS / 一纸留言

读者留言 0 条

一纸留言,便是山水间的一次相逢。

还没有留言,欢迎写下第一段交流。

WRITE A COMMENT

写下你的留言