我想把一个窗体封装为DLL。现在我的工程文件的代码为 :
library ProDLLfrm;uses
DLLfrm in 'DLLfrm.pas' {DLLForm};exports
Showcalendar; //导出函数可显示窗体。beginend.
我在DLLfrm单元中也定义了Showcalendar这个函数,可是编译的时候为什么提示Showcalendar没有定义呢?
library ProDLLfrm;uses
DLLfrm in 'DLLfrm.pas' {DLLForm};exports
Showcalendar; //导出函数可显示窗体。beginend.
我在DLLfrm单元中也定义了Showcalendar这个函数,可是编译的时候为什么提示Showcalendar没有定义呢?
Forms,
Dialogs,在{$R *.res}下插入以下函数就可以了
procedure Showcalendar(Sender:Tobject);
begin
try
Application.CreateForm(DLLForm, DLLForm); DLLForm.ShowModal;
finally
DLLForm.Free;
end;
end;
最后写上下面二行
exports
Showcalendar; //导出函数可显示窗体。
'.' excepted but ';' found
可是我的符号没有错啊?不知道是什么原因请大家帮忙!