升级到Delphi 6 - 兼容性问题之三(完)

 

 

八.             TDesignWindow 的变化

许多变化都和类TDesignWindow有关。它的声明被移到单元DesignWindows中,并且FromClosed方法被替换为DesignerClosed。以往,在FromClosed事件中可以通过访问参数Aform来访问Form。而在新的事件DesignerClosed中,我们需要访问DesignerRoot属性来访问Form

FormClosed事件中,我们可以通过调用TDesignerSelectionList.Create 或者 TComponentList.Create来创建选择列表。而在DesignerClosed事件中作同样的事情,我们得使用IDesignerSelections接口。你可以调用CreateSelectionList函数来获得一个借口。

SelectionClosed方法的参数也和Delphi 5版本中的有所不同。

 

TDesignWindow changes

There have been a number of changes related to the class TDesignWindow. It has been moved to the DesignWindows unit, and its FormClosed method has been replaced by DesignerClosed. In the past, one could obtain access to the form within FormClosed by using the AForm parameter. In DesignerClosed, it is now necessary to use Designer's Root property to access the form.

       In FormClosed, one would create selection lists by calling TDesignerSelectionList.Create or TComponentList.Create. To create selection lists within DesignerClosed, it is necessary to use an IDesignerSelections interface. You can create one using the CreateSelectionList function.

Parameters for the SelectionClosed method are also different from what they were in Delphi 5.

       Borland wishes to thank field tester Matt Palcic for bringing these changes to our attention.

 

九.             VCL 包的变化

一些VCL相关的包已经被重新分配到其他的包里。假如你在工程中引用了vcl50.dcp,那么你需要将这个引用改为其他单元,如vcl.dcprtl.dcp

 

VCL package changes

The contents of some of the VCL-related packages have been redistributed into other packages. If you made references to vcl50.dcp in your project, you will need to change those references to other units, such as vcl.dcp and rtl.dcp.

Borland wishes to thank field tester Clay Shannon for bringing this change to our attention.

 

十.             OpenGL 接口单元改到rtl.dcp

Borland OpenGL接口单元(opengl.dcu)在Delphi 5的库单元目录中是一个独立的单元。在Delphi 6中它被合并到rtl.dcp中。这可能导致某些Delphi 5的工程升级到Delphi 6时引发一些问题。

举个例子来说。在Delphi 5的工程中,可能你会将与OpenGL单元同名的单元放置在工程目录中,以覆盖系统提供的OpenGL单元。而在Delphi 6中,假如有任何组件引用了rtl.dcp,则将导致命名冲突,得更改名称才行。

 

OpenGL interface unit moved to rtl.dcp

The Borland OpenGL interface unit (opengl.dcu) was an independent unit in the Delphi 5 Lib folder. It has been incorporated into rtl.dcp in Delphi 6. This may cause some problems for Delphi 5 projects ported to Delphi 6.

       Here is an example. In a Delphi 5 project, it was possible to make a project-specific override of the OpenGL unit by placing a unit with the same name somewhere in your project path. The same method used in Delphi 6 causes a name conflict in any component that uses rtl.dcp also, and a name change is now required.

Borland wishes to thank field tester John Williams for bringing this change to our attention.

 

十一.             HTTPApp.pas 单元中的一些类型声明移动到 HTTPProd.pas单元中

HTTPApp 单元中的一部分类型被移动到了HTTPProd 单元中。他们是THTMLBgColorTHTMLAlign THTMLVAlign。如果你的工程中使用了这些类,那么需要将引用的单元由HTTPProd改为 HTTPApp

 

Types moved from HTTPApp.pas to HTTPProd.pas

Several types in the HTTPApp unit have been moved to the HTTPProd unit. They are THTMLBgColor, THTMLAlign and THTMLVAlign. If your projects use any of these units, you should change your uses statements to refer to HTTPProd instead HTTPApp.

 

十二.             Search 单元被删除,SearchBuf例程做了修改并被移动

单元SearchDelphi 6中不再保留。SearchBuf例程,用来在一个文本的缓冲区中定位子串,已经被移动到StrUtils单元中,并且调用的参数也发生了变化。最后一个参数改为一个TstringSearchOptions的对象。如果你的工程因为不能找到Search单元而无法编译,请将引用Search改为引用StrUtils单元。同时你应当检查对SearchBuf的调用是否符合新的语法。

 

Search unit removed, SearchBuf moved and changed

The unit Search no longer exists in Delphi 6. The SearchBuf routine, which locates a substring within a text buffer, has been moved to the StrUtils unit and its parameters have changed. The final parameter is now a TStringSearchOptions object. If your project won't compile because the compiler can't find the Search unit, change your uses statement to include StrUtils instead of Search. You will also want to check your SearchBuf calls to ensure that your parameters match the new syntax.

 

[文终]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
<br> <img src=DownloadFilesdbf_activeximages ddataform_scr.gif> 让你开发的数据库程序更高效更快速地创建数据库表单!<br> <br> Neodeck Data Form ActiveX 控件 让你在数据库应用程序中加入自动针对各个数据表生成相应的录入界面的功能,你只要设置好数据库和需要用到的数据表就可以了,剩下的工作它来成。Neodeck Data Form ActiveX控件既可以作为控件被别的程序调用,也可以当做一个整的应用程序来用;支持布尔运算,而且在用户输入数据时能自动搜索数据库之前输入的数据进行匹配比较供用户选择,大大加快了数据输入的速度;还支持用SQL语句来筛选输入数据。<br> <br> Neodeck Data Form ActiveX控件的界面如下,点击放大:<br> <br> <img src=DownloadFilesdbf_activeximages ddataform_scr1.jpg border="0"> <img src=DownloadFilesdbf_activeximages ddataform_scr2.jpg width="143" height="118" border="0"> <br> <br> Neodeck Data Form ActiveX控件的关键特色: 当需要输入文件路径时,提供一个“浏览”按钮让用户查找文件,并自动把文件的路径输入到文本框中,极为方便; 本控件支持布尔运算,而且在用户输入数据时能自动搜索数据库之前输入的数据进行匹配比较供用户选择,大大加快了数据输入的速度; Neodeck Data Form ActiveX控件既可以作为控件被别的程序调用,也可以当做一个整的应用程序来用; Neodeck Data Form ActiveX控件还支持用SQL语句来筛选输入数据; Neodeck Data Form ActiveX 的下载: <br>
Delphi11 是最新的 Delphi 版本,而 `delphi-opencv-master` 是一个开源的 Delphi 与 OpenCV 集成的项目,它提供了一组 Delphi 封装的 OpenCV 函数和类,方便 Delphi 开发者使用 OpenCV 进行图像处理和计算机视觉操作。 在 Delphi11 中,你可以通过以下步骤来使用 `delphi-opencv-master`: 1. 首先,你需要下载 `delphi-opencv-master` 项目的源代码,可以从 GitHub 上下载:https://github.com/Laex/Delphi-OpenCV 2. 解压缩下载的源代码,并将其中的 `OpenCV` 文件夹复制到 Delphi11 项目的根目录下。 3. 在 Delphi11 中打开你的项目,然后在菜单栏中选择 `Project` -> `Options` -> `Delphi Compiler` -> `Search Path`,将 OpenCV 文件夹所在的路径添加到搜索路径中。 4. 在 Delphi11 中使用 `uses` 语句引入 `OpenCV_Image` 单元,并调用其中的函数和类来进行图像处理和计算机视觉操作。 例如,以下代码演示了如何使用 `delphi-opencv-master` 进行图像读取和灰度化: ``` uses OpenCV_Image; var img: IplImage; begin // 读取图像 img := LoadImage('lena.jpg'); // 将图像转换为灰度图像 cvCvtColor(img, img, CV_RGB2GRAY); // 显示图像 ShowImage('My Image', img); // 等待用户按下任意键 WaitKey; // 释放图像内存 img.Release; end; ``` 这段代码使用了 `OpenCV_Image` 单元中提供的 `LoadImage` 函数和 `ShowImage` 函数来读取和显示图像,使用了 OpenCV 库中的 `cvCvtColor` 函数将图像转换为灰度图像。你可以根据自己的需要,使用 `delphi-opencv-master` 中提供的其他函数和类来进行更加复杂的图像处理和计算机视觉操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

musicwind

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值