Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   TFrame als DLL? (https://www.delphipraxis.net/185143-tframe-als-dll.html)

Maiky 18. Mai 2015 20:54

TFrame als DLL?
 
Hallo.

Ich habe eine alte RAD Studio 2009 Anwendung die zusätzlich über 20 TFrame hat. Über ein Menü füge ich die TFrame in das Hauptfenster ein. Hier ein Auszug: (Sorry, dass war noch ein C++ Projekt):
Code:
template<typename T> void __fastcall TForm1::InsertFrame(TObject *Sender)
{
    if (MyFrame!=NULL) delete MyFrame;

    T* Modul = new T(this);
    Modul->Parent = Form1;
    Modul->Visible = false;
    Modul->Align = alClient;
    Modul->Visible = true;
    Modul->HorzScrollBar->Visible = true;
    Modul->VertScrollBar->Visible = true;

    MyFrame = Modul;

    if (Sender)
    {
        TMenuItem *Item = static_cast<TMenuItem*>(Sender);
        TMenuItem *ParentItem = Item->Parent;
        Caption = ParentItem->Caption + " \\ " + Item->Caption;
    }
}
Was ich jetzt gern ändern würde. Die TFrame liegen ja mit in der EXE. Ich hätte diese gern als DLL oder vergleichbar separat als Datei und würde sie nur laden wollen, wenn es das Projekt benötigt. Kennt jemand dafür eventuell ein Tutorial oder die Schritte die dazu nötig sind?

himitsu 18. Mai 2015 21:15

AW: TFrame als DLL?
 
DLL nein (Klassen und DLLs mögen sich nicht, wenn man die daraus in der EXE haben will)


BPL wäre aber möglich, also Unit in Package verschieben, Unit in EXE einbinden (Uses, also wie gehabt) und dann EXE gegen diese BPL/DCP (und die RTL/VCL) linken.


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:47 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz