Solved

Put MDI Child forms in DLL

Posted on 2002-06-17
3
449 Views
Last Modified: 2010-04-04
Hi Experts,

I'm working on a large Delphi project that currently has 1 MDI Form and over 50 MDI Childs. The compiled executable is now 4 MB. The program is running on a Citrix server.

What I like to do is to put some part of the program in a DLL, most users will only work with a small part of the program (the data entry). A large part of the program won't be used by all users, and when used it is not that often.

At this moment all users are running the complete executable. Although the MDI Childs are only created when needed and destroyed when they are closed, the users still have to load the complete program into memory. All MDI Childs are in the uses clause of the main form.

I know a DLL can be used to define external procedures. But in my case we're not talking about procedures but about complete (child) forms.

Is there a way to reduce the size of my executable by putting some MDI Childs in a DLL (or somewhere else). I want the user to launch a small application, and the MDI Child must be loaded when needed.

Thanks for any help.

JDN
0
Comment
Question by:JDN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
Cynna earned 50 total points
ID: 7083484
JDN,

First of all, if your main goal is reducing the size of your exe, then DLL is not the "proper" way to go. Use packages (BPL) instead - that's what they are for. I don't know much about them, but look at this quote from Jeff Overcash (TeamB):

"...The problem is that DLL's have their own Application object that is different than your EXE's.  The simplest way to fix this is to use a BPL instead of a DLL.  BPL's get loaded into the EXE's address space and shares the VCL Globals automatically.  If you must use a dll then pass the Apllication object from your exe to the Dll and assign the Handle of the EXE's Application object to the Handle of the Dll's Application Object.  BPL's are a much cleaner way to do this."


But if you want to use DLL anyway, this is a demo project that does exactly what you want:

http://community.borland.com/homepages/dsp/ftp/d30free/childwnd.zip


0
 

Expert Comment

by:CleanupPing
ID: 9343190
JDN:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9453414
JDN,
No comment has been added lately (17 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Cynna http:#7083484

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month7 days, 15 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question