小弟只有100分了,请各位大侠帮帮忙!急啊!!(万分感谢---在线等待)

linqiu6 2002-06-04 10:07:26
1.在DLL中实现的窗体,如何可以成为Mdi中的子窗体,我把窗体的formstyle设为fsmdichild了,但我在程序中调用时会出错(提示:no mdi forms are currently active).
2.如何把dll中的窗体的菜单合并到主窗体中的菜单中.
...全文
76 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
taxi 2002-06-05
  • 打赏
  • 举报
回复
我的方法可以呀。
taxi 2002-06-04
  • 打赏
  • 举报
回复
信被退回来了,你按照我贴的原代码做就可以了。
linqiu6 2002-06-04
  • 打赏
  • 举报
回复
再发一份吧,我再等一会儿,谢了
taxi 2002-06-04
  • 打赏
  • 举报
回复
不会吧,我发了呀。
linqiu6 2002-06-04
  • 打赏
  • 举报
回复
还没有收到
taxi 2002-06-04
  • 打赏
  • 举报
回复
不知道。
linqiu6 2002-06-04
  • 打赏
  • 举报
回复
补充:
我现在的这个dll是可以供vb使用的,不知道菜单合并有没有用
taxi 2002-06-04
  • 打赏
  • 举报
回复
已发。
linqiu6 2002-06-04
  • 打赏
  • 举报
回复
e-mail:linqiu@163.net
knock 2002-06-04
  • 打赏
  • 举报
回复
必须把主窗口设为MDI父窗口
taxi 2002-06-04
  • 打赏
  • 举报
回复
把Email留下来,我把程序源码发给你看看。
taxi 2002-06-04
  • 打赏
  • 举报
回复
菜单合并和在一个应用程序做MDI菜单合并一样,主要是设置菜单的GroupIndex属性
taxi 2002-06-04
  • 打赏
  • 举报
回复
主窗体源代码
unit MainFrm;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, ComCtrls, ToolWin;

type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
ToolBar1: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
F1: TMenuItem;
fsdf1: TMenuItem;
fsdfsd1: TMenuItem;
fdsfds1: TMenuItem;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

procedure ShowForm(MainApp: TApplication); stdcall; external 'DLL.dll' name 'ShowForm';

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure Search(Position: Integer);
begin
ShowMessage(IntToStr(Position));
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
ShowForm(Application);
end;

end.

//dll源代码
library 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
Windows,
SysUtils,
Classes,
Dialogs,
Forms,
DllFrm in 'DllFrm.pas' {ChildForm};

{$R *.res}

var
DllApp: TApplication;

procedure ShowForm(MainApp: TApplication); stdcall;
begin
if not Assigned(DllApp) then
begin
DllApp := Application;
Application := MainApp;
end;

Application.CreateForm(TChildForm, ChildForm);
end;

procedure DllEntryPoint(dwReason: Integer);
begin
if dwReason = DLL_PROCESS_DETACH then
begin
if Assigned(DllApp) then
Application := DllApp;
end;
end;

exports
ShowForm;

begin
DllProc := @DllEntryPoint;
end.
你想当“李逍遥”式的“大侠”吗? 这里无需计算机基础,无需编程经验,你也不必是计算机专业的在校大学生....只要爱好游戏,怀揣梦想! 有一定自主学习能力,跟着刘老师从“编程小白”修炼为游戏研发“大虾”吧!!!学习好Unity,其先决条件是一定要有稳固、扎实的编程基础!课程 《C# For Unity系列之入门篇》配套学习资料链接:http://pan.baidu.com/s/1gflxreN 密码:sou5;刘老师讲Unity学员群(2) 497429806一、热更新系列(技术含量:中高级):A:《lua热更新技术中级篇》https://edu.csdn.net/course/detail/27087B:《热更新框架设计之Xlua基础视频课程》https://edu.csdn.net/course/detail/27110C:《热更新框架设计之热更流程与热补丁技术》https://edu.csdn.net/course/detail/27118D:《热更新框架设计之客户端热更框架(上)》https://edu.csdn.net/course/detail/27132E:《热更新框架设计之客户端热更框架(中)》https://edu.csdn.net/course/detail/27135F:《热更新框架设计之客户端热更框架(下)》https://edu.csdn.net/course/detail/27136二:框架设计系列(技术含量:中级): A:《游戏UI界面框架设计系列视频课程》https://edu.csdn.net/course/detail/27142B:《Unity客户端框架设计PureMVC篇视频课程(上)》https://edu.csdn.net/course/detail/27172C:《Unity客户端框架设计PureMVC篇视频课程(下)》https://edu.csdn.net/course/detail/27173D:《AssetBundle框架设计_框架篇视频课程》https://edu.csdn.net/course/detail/27169三、Unity脚本从入门到精通(技术含量:初级)A:《C# For Unity系列之入门篇》https://edu.csdn.net/course/detail/4560B:《C# For Unity系列之基础篇》https://edu.csdn.net/course/detail/4595C: 《C# For Unity系列之中级篇》https://edu.csdn.net/course/detail/24422D:《C# For Unity系列之进阶篇》https://edu.csdn.net/course/detail/24465四、虚拟现实(VR)与增强现实(AR):(技术含量:初级)A:《虚拟现实之汽车仿真模拟系统 》https://edu.csdn.net/course/detail/26618五、Unity基础课程系列(技术含量:初级) A:《台球游戏与FlappyBirds—Unity快速入门系列视频课程(第1部)》 https://edu.csdn.net/course/detail/24643B:《太空射击与移动端发布技术-Unity快速入门系列视频课程(第2部)》https://edu.csdn.net/course/detail/24645 C:《Unity ECS(二) 小试牛刀》https://edu.csdn.net/course/detail/27096六、Unity ARPG课程(技术含量:初中级):A:《MMOARPG地下守护神_单机版实战视频课程(上部)》https://edu.csdn.net/course/detail/24965B:《MMOARPG地下守护神_单机版实战视频课程(中部)》https://edu.csdn.net/course/detail/24968C:《MMOARPG地下守护神_单机版实战视频课程(下部)》https://edu.csdn.net/course/detail/24979

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧