1

I have no experience with dlls right now. My application consists of several programs with several Forms and units. Now I want to put them all "together". That means, I want to have one Login that would call these separate programs from dlls.

Since the programs have several units themselves, my question is, whether it is possible to put more than one Form / Unit into one DLL. (a complete program) Then I could call the Programs as dlls.

Until now the programs run separately, there are no dependencies between them. Inside them there are cascading forms (Form1 calls Form2 or form3 or ...). If it is not possible to put them all together in one dll, can I cascade dlls (i.e. call dll 1 dll1 calls dll 2)?

I use Delphi 2007 / XE with Firebird 2.x via IBDac

TIA

4

3 回答 3

2

请注意,DLL 和 EXE 中的 Application 对象的实例将是分开的。您必须将 Application.Handle 从 Exe 传递给您的 DLL 并进行设置。否则,您将在 Windows 任务栏上获得单独的应用程序按钮。

于 2012-07-22T19:30:46.407 回答
1

是的,您可以在 DLL 中放置任意数量的单元。就像在任何其他 Delphi 项目中一样,这些单元可以具有与它们相关联的形式,也可以不具有相关联的形式。

于 2012-07-22T16:05:24.543 回答
1

如果没有使用 DLL 的任何特定原因(例如能够从其他编程语言调用/编写它们),则应考虑改用包。

您可以根据需要将任意数量的单元和表格放入一个包中,但请注意单元名称必须是唯一的:您不能加载包含相同单元的多个包(但您可以将这些单元放入多个包使用的单独包中)。

于 2012-07-23T07:49:01.863 回答