form in dll ,form cant contain any ctrl ,button,edit,listview ..., lazarus / 31-LCL ---------------------------------------------------------------------- regubed · 2021-03-08 06:29 form in dll ,form cant contain any ctrl ,button,edit,listview ..., even if a button ,when inject dll ,the application crash, try exception  no use ....what can i do ,thank u ---------------------------------------------------------------------- MarkMLl · 2021-03-08 08:47 Short answer: correct. Longer answer: https://wiki.freepascal.org/Form_in_DLL This is a well-documented and well-understood limitation. What I've done in the past is used a form in a shared-object file (the unix analogue of a DLL) to build up menus etc., and then copied them to the main form at runtime. MarkMLl ---------------------------------------------------------------------- balazsszekely · 2021-03-08 17:09 Tested the attached application with:  - Lazarus 2.0.12/Trunk and FPC 3.2.0  - Windows 10, Linux Mint 19.2 Cinnamon, macOS 10.16 Big Sur Please do the following: 1. Open then build plugin.lpi from pluginlibrary subfolder. This is the library(dll, so, dylib), it contains form, buttons, images, etc... 2. Open test.lpi, build then run the project. When you press the "Load" button, the form from the library is loaded then embedded in the main form. Is this what are you after? ---------------------------------------------------------------------- alaa123456789 · 2021-03-09 17:39 Quote from: GetMem on March 08, 2021, 06:09:38 pmTested the attached application with:  - Lazarus 2.0.12/Trunk and FPC 3.2.0  - Windows 10, Linux Mint 19.2 Cinnamon, macOS 10.16 Big Sur Please do the following: 1. Open then build plugin.lpi from pluginlibrary subfolder. This is the library(dll, so, dylib), it contains form, buttons, images, etc... 2. Open test.lpi, build then run the project. When you press the "Load" button, the form from the library is loaded then embedded in the main form. Is this what are you after? very nice example ,thank you ,when i press x button we got this (attached) thanks ---------------------------------------------------------------------- balazsszekely · 2021-03-09 17:44 @alaa123456789 Quotewhen i press x button we got this (attached)The dialog is just a quick check for memory leaks. You can remove it by unchecking the checkbox in the project options.