• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

Docking from Dll Form

I would like to dock a form which is contained in a DLL?  I can dock a standard form from my app, but when I drag the Dll Form over my Application, it does not Dock!!  The settings are all the same.  I have even synchronized the Application Handles.  There has got to be a way to tell my main app that the dll form is dockable.
0
clearchoice
Asked:
clearchoice
  • 2
  • 2
1 Solution
 
rwilson032697Commented:
Do you use runtime packages? This _might_ be the simplest way to solve your problem...

Go to project|Options -> Packages and Check the Build with runtime packages checkbox for both application and DLL.

Let me know...

Cheers,

Raymond.
0
 
clearchoiceAuthor Commented:
Okay, for 200 points you better tell me how in the hell that worked.  I obviously have a gross conceptually error going on in my head.  What is the difference?

Also, does this change the distribution requirements of my software.  In other words, do I need to package up some things to give the end user in order for it to work?
0
 
rwilson032697Commented:
Well, it goes like this...

When you compile an EXE/DLL without runtime packages you get a large amoune of common code compiled in (the VCL largely), which is no real problem. However, that code also has quite a bit of global state tied up with it. This is one reason you need to fiddle with the application object in DLLs to make tham behave.

When you compile with runtime packages the VCL code (and hence its global state) all get bundled up into vcl40.dcp (Delphi 4 VCL package) etc. This means that operation such as drag 'n drop, database session management etc etc which reference global VCL state information behave, whereas when the VCL is statically linked into each EXE/DLL confision can occur with operations referring to different copies of the global statr information.

I hope ths explains it for you...

This does meqan that you will need to distribute the .DCP files that are used by your app. Which ones you need depends on what your app is using (DB components, TeeChart etc etc). At the very least you will need to distribute VCL40.DCP (or VCL50.DCP for D5...).

These can be found in the #(Delphi)\Lib directory and are freely redistributable.

Needing to redistribute the packages is the reason I said it might be the best way for you...

Cheers,

Raymond.
0
 
clearchoiceAuthor Commented:
Thanks, This was very helpful and very doubtful that I would have found it anywhere else.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now