啥事件,DLL的事件? 没消息循环咋来事件 - -?你最好封装一个函数在 Dll 中 function 函数名; external dll名 name 'dll名';调用该函数,函数内容中创建窗体 CreateWindow;
//dll 例子library yb_sfxmdz;{ Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. This applies to all strings passed to and from your DLL--even those that are nested in records and classes. ShareMem is the interface unit to the BORLNDMM.DLL shared memory manager, which must be deployed along with your DLL. To avoid using BORLNDMM.DLL, pass string information using PChar or ShortString parameters. }uses SysUtils, Classes, main in 'main.pas' {FormMain}, ReportUtility in 'ReportUtility.pas';{$R *.RES}exports fyb_sfxmdz;begin end.
function 函数名; external dll名 name 'dll名';调用该函数,函数内容中创建窗体 CreateWindow;
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }uses
SysUtils,
Classes,
main in 'main.pas' {FormMain},
ReportUtility in 'ReportUtility.pas';{$R *.RES}exports fyb_sfxmdz;begin
end.
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus;type
Ttestform = class(TForm)
MainMenu1: TMainMenu;
testmenu1: TMenuItem;
procedure testmenu1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
testform: Ttestform;implementationuses main;{$R *.DFM}procedure Ttestform.testmenu1Click(Sender: TObject);
begin
fyb_sfxmdz;
end;
end.