Solved

Put MDI Child forms in DLL

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error E2158 compiling with Delphi XE10 Seattle 2 142
DBCtrlGrid, Delphi, Scroll 8 88
delphi popmenu non latine charcters 3 49
TAction.OnAfterExecute? 2 32
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

710 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