新来的菜 20分求怎么关闭DLL窗体 请问怎么关闭DLL窗体? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对不起我没说清楚,是通过一个按钮来关闭DLL窗体 用Close会报错如下Access violation at address 003A1441 in module 'systeam.dll'. Read of address 000002EC. 我的DLL窗体是外部创建的和主程序不属一个工程文件再请问一下DLL窗体可以和主程序创建在同一个工程文件里吗? 我总是用下面的代码书写DLL中的Form(模式与非模式,从来没有出现错误),代参考:function ShowModalForm(ahandle : THandle;aCaption : ShortString) : Boolean;stdcall;export;function ShowFormMe(aHandle : THandle;aCaption : ShortString) : LongInt; stdcall;export;procedure CloseFormMe(var ahandle : Longint);implementation{$R *.DFM}function ShowFormMe(aHandle : THandle;aCaption : ShortString) : LongInt;stdcall;var aForm : TForm1;begin Application.Handle := aHandle; aForm := TForm1.Create(Application); aform.Caption := aCaption; Result := LongInt(aForm); aForm.show;end;procedure CloseFormMe(var aHandle : LongInt);begin if ahandle>0 then TForm1(ahandle).free; ahandle:=0;end;function ShowModalForm(aHandle : THandle;aCaption : ShortString) : Boolean;stdcall;var aForm : TForm1;begin Result := false; Application.Handle := ahandle; aForm := TForm1.Create(Application); try aForm.Caption := aCaption; aForm.ShowModal; Result := True; finally aForm.free; end;end; 如何枚举ACCESS数据库里面所有记录呢? 菜鸟求助[Fatal Error] Unit1.pas(6): File not found: 'MessageBox.dcu'的问题! 如何将隐藏的标题显示出来 明天面试,希望能通过,散分了4 寻五笔快打2.80的注册码! 江湖救急!!谁有 paradox 数据库的修复工具? 怎么会提示 TypeInfo.dcu 文件找不到呢? 三层数据库的尝试,就差一步了?? adoquery的小问题,请大家指点指点 有《delphi5 开发人员指南》再买《delphi6 开发人员指南》是否是重复投资不值? 字條截取問題!! 今天四个裤衩了,特别高兴,散分了!
Access violation at address 003A1441 in module 'systeam.dll'. Read of address 000002EC.
function ShowModalForm(ahandle : THandle;aCaption : ShortString) : Boolean;stdcall;export;
function ShowFormMe(aHandle : THandle;aCaption : ShortString) : LongInt; stdcall;export;
procedure CloseFormMe(var ahandle : Longint);
implementation{$R *.DFM}
function ShowFormMe(aHandle : THandle;aCaption : ShortString) : LongInt;stdcall;
var
aForm : TForm1;
begin
Application.Handle := aHandle;
aForm := TForm1.Create(Application);
aform.Caption := aCaption;
Result := LongInt(aForm);
aForm.show;
end;procedure CloseFormMe(var aHandle : LongInt);
begin
if ahandle>0 then
TForm1(ahandle).free;
ahandle:=0;
end;function ShowModalForm(aHandle : THandle;aCaption : ShortString) : Boolean;stdcall;
var
aForm : TForm1;
begin
Result := false;
Application.Handle := ahandle;
aForm := TForm1.Create(Application);
try
aForm.Caption := aCaption;
aForm.ShowModal;
Result := True;
finally
aForm.free;
end;
end;