Solved

Put MDI Child forms in DLL

Posted on 2002-06-17
3
444 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
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 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