Solved

Put MDI Child forms in DLL

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

912 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

22 Experts available now in Live!

Get 1:1 Help Now