求助调用DLL子窗体装入PAGECONTROL中的问题
library UDllFrom; //DLL庫封裝之處
{ 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,
forms,
RzTabs,
UChildForm in 'UChildForm.pas' {Form1};
{$R *.res}
procedure AddTabSheet(FormClass: TFormClass;tbs:TRZTabSheet; rzpgc:TRZPagecontrol);
var
Form:TForm;
begin
rzpgc.ActivePage := tbs; //加上这一步算是双向指定了,指定激活页
Form := FormClass.Create(tbs); //创建Form(用TabSheet)实例
Form.Parent := tbs; //指定Form的父窗体
tbs.Caption := Form.Caption; //标题
tbs.TabVisible:=True;
Form.Show; //显示
end;
function run_form(hs:THandle;tbs:TRZTabSheet;rzpgc:TRZPagecontrol):integer;stdcall;
var
TForm1:TFormclass;
begin
Application.Handle:=hs;
AddTabSheet(TForm1,tbs,rzpgc);
end;
exports
run_form;
begin
end.
-----------------------------調用DLL窗體,將子窗体装入主窗体中
unit UTestForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RzTabs, StdCtrls, Buttons;
type
TTestForm = class(TForm)
rzpgc: TRzPageControl;
tbs: TRzTabSheet;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function rum_Form(hs:THandle;tbs:TRZTabSheet;rzpgc:TRZPagecontrol):Integer;stdcall;external 'UDllFrom.dll';
var
TestForm: TTestForm;
implementation
{$R *.dfm}
procedure TTestForm.BitBtn1Click(Sender: TObject);
begin
rum_Form(Application.Handle,tbs,rzpgc);
end;
end.
----------------------------
提示錯誤,無法找到程序的輸入點
{ 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,
forms,
RzTabs,
UChildForm in 'UChildForm.pas' {Form1};
{$R *.res}
procedure AddTabSheet(FormClass: TFormClass;tbs:TRZTabSheet; rzpgc:TRZPagecontrol);
var
Form:TForm;
begin
rzpgc.ActivePage := tbs; //加上这一步算是双向指定了,指定激活页
Form := FormClass.Create(tbs); //创建Form(用TabSheet)实例
Form.Parent := tbs; //指定Form的父窗体
tbs.Caption := Form.Caption; //标题
tbs.TabVisible:=True;
Form.Show; //显示
end;
function run_form(hs:THandle;tbs:TRZTabSheet;rzpgc:TRZPagecontrol):integer;stdcall;
var
TForm1:TFormclass;
begin
Application.Handle:=hs;
AddTabSheet(TForm1,tbs,rzpgc);
end;
exports
run_form;
begin
end.
-----------------------------調用DLL窗體,將子窗体装入主窗体中
unit UTestForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RzTabs, StdCtrls, Buttons;
type
TTestForm = class(TForm)
rzpgc: TRzPageControl;
tbs: TRzTabSheet;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function rum_Form(hs:THandle;tbs:TRZTabSheet;rzpgc:TRZPagecontrol):Integer;stdcall;external 'UDllFrom.dll';
var
TestForm: TTestForm;
implementation
{$R *.dfm}
procedure TTestForm.BitBtn1Click(Sender: TObject);
begin
rum_Form(Application.Handle,tbs,rzpgc);
end;
end.
----------------------------
提示錯誤,無法找到程序的輸入點
...全文
相关推荐
delphi写的调用Dll中的窗体的范例和源码
Exe调用Dll 中Form 的例子 可以传入字符串,返回字符串,包含全部源代码
Delph插件窗体Dll和mdi,实现Tabcontrol多页面管理
Delphi实现mdi窗体封装到dll中并实现插件管理,动态加载,采用tabcontrol多页面管理
delphi 实现pagecontrol多文档界面
delphi 实现pagecontrol多文档界面,类似c#多文档窗口,用到RZ控件RZpagecontrol
delphi dll from 对应 PageControl TabSheet
DLL封装FORM 打开时 对应EXE里PageControl的 TabSheet 类似GreanBrowser 和 傲游浏览器 郁闷了很久 问了很久今天终于写好了 累 主要通过form.handle BringWindowToTop(FormHwnd); SetForegroundWindow(FormHwnd); 实现
Devexpress Page Control 2.12 ForD7
Devexpress Page Control 2.12 For Delphi7,页码控件,类似优化大师界面,含密。


