主应用程序调用DLL,DLL创建窗体A,现希望窗体A停靠到主应用程序中的panel中,但停靠进去的窗体显示不出来,只能显示出顶部的两个细横杆和关闭的小叉!大家帮忙解决一下!!
解决方案 »
- 一个奇怪的问题,请教大家!
- 大家帮我看一下这段代码,关于字符串存到文件的
- 在线等待-100分求救 我的程序里用到了TTS(Text-To-Spech),请问我怎么才能把我的程序做成安装程序呢!
- 对不起,没有分接。
- 各位兄弟--memo里面怎么输入特殊字符呀---急需
- 字体的问题
- Applicaton 与CLX Application 有何区别
- 为什么我用串口调试助手有发送没有收到?
- 请各位同仁讨论下Delphi6.0的特点!
- **[高分180]有没有更加好的转换图片分辨率的算法?同时送一份新年礼物给大家!
- 如果检测到某个表 就删除??//??//??
- DELPHI +SQL SERVER2000 模糊查询与数据库备份的问题
你传递的参数是什么??
代码写出来啊,—……
拖动那个小横杆,把窗口拽出来看看就知道了
library Project1;uses
SysUtils,
Classes,
Controls,
Forms,
Unit1 in 'Unit1.pas' {Form1};{$R *.res}procedure startWithDock(app:THandle;dockControl:TWinControl);stdcall;
begin
if Form1=nil then begin
application.Handle:=app;
Form1:=TForm1.Create(application);
Form1.ManualDock(dockControl,nil,alClient);
Form1.Show;
end
else begin
Form1.Show;
end;
end;procedure quitAndFree();stdcall;
begin
if Form1<>nil then begin
Form1.Free;
Form1:=nil;
end;
end;exports
startWithDock,quitAndFree;begin
Form1:=nil;
end.//DLLForm1
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Memo1: TMemo;
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}end.
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, unit2;type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementationprocedure startWithDock(app:THandle;dockSite:TWinControl);stdcall;external 'project1.dll';
procedure quitAndFree;stdcall;external 'project1.dll';{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
startWithDock(application.Handle,panel2);
end;procedure TForm1.Button2Click(Sender: TObject);
begin
quitAndFree;
end;end.
begin
Application.Handle := aHandle;
Screen := aScreen;
frmMain1 := TfrmMain1.Create(nil);
frmMain1.Show;
end;