我用创建了一个dll窗体
在此dll窗体里我想再创建一个子的模式窗体
却老是出错,请指教!
代码:如下
我在dll窗体上一个按钮中写:
with tform2.create(dllform) do
try
showmodal;
finally
free;
end;
能创建,但老出现一个内存错误的问题!如何改呢?
在此dll窗体里我想再创建一个子的模式窗体
却老是出错,请指教!
代码:如下
我在dll窗体上一个按钮中写:
with tform2.create(dllform) do
try
showmodal;
finally
free;
end;
能创建,但老出现一个内存错误的问题!如何改呢?
解决方案 »
- 我的Dephi 7 ide中没有midas页,该怎么办......? 在线
- 新手请教。谢谢。如何把窗体上的最大化按钮去掉????
- 请大家教我怎么写线程!回答的好份都给你!
- delphi如何通过代码设置打印机的默认纸张?
- 求完整的 Win32 程序员参考大全----消息、结构和宏 电子书
- 我爱QQ 但我恨TE
- 帮忙给个意见
- 在线等待,如何声明一个DLL中的类?最好有源码
- query的问题
- clientdataset过滤使用like 语句 ,出现type mismatch inexpression .安装delphi2010后又可以什么原因
- 下面的触发器有什么问题??在线.........谢谢!
- 关于绘图问题
Form2 := TForm2.create(dllform);
Form2.ShowModal;
Form2.Free;
呵呵
怎么办?
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,
Forms,
CMain in 'CMain.pas' {fmMain},
P_date in 'P_date.pas' {Frm_zipson};{$R *.res}var
Form1: TfmMain;procedure OpenForm(ParentHandle,AppHandle: Longword) ;stdcall;
begin
Application.Handle := AppHandle;
Form1 := TfmMain.CreateParented(ParentHandle);
Form1.Show;
end;procedure ActiveForm();stdcall;
begin
Form1.BringToFront;
end;procedure FreeForm();stdcall;
begin
FreeAndNil(Form1);
end;procedure ShowMapForm();stdcall;
begin
//
end;exports OpenForm;
exports ActiveForm;
exports FreeForm;
exports ShowMapForm; begin
end.
然后在dll一按钮中写如上所有create和showmodal方法,都出错,怎么改正呢?
这里改 Form1 := TfmMain.CreateParented(Application);