Solved

Put MDI Child forms in DLL

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now