Hello all friends.....
How to create a form in dll.
Hello all friends.....
How to create a form in dll.
You can make code that creates and displays a form, just like you would anywhere else. What you can't do without a lot of inconvenience is pass a TForm object (or any other object) out of the DLL, so it has to be self-contained. If you want a form that can communicate and interact with your program, you either need a package (BPL) or you need to make the form into a COM object.
The easiest way to do this is to compile your application and the DLL in question with packages. This requires that you include several BPL files with your application when it's deployed, but means that both the EXE and the DLL will be much, much smaller (great for on-the-fly updates!)
There are a number of open-source and commercial products that will help you "plug-in" forms into your application. http://delphi-jedi.org has the JVCL which includes a plugin system that will let you do this pretty easily, and take a lot of the heavy lifting out of developing it. Also, TMS Software at http://tmssoftware.com has a plugin framework that will allow you to do this as well.