I have the following situation, project in *.bpl VCL structure. I want to adapt a screen made in FMX in this structure using LoadPackage and GetClass.
When I run form VCL after running FMX it loses reference in the GetClass function. But it can return the address that was allocated in the LoadPackage function. I couldn’t see what might be going on.
If anyone has an idea of what might be happening or has been through it.
oFMXClass := GetClass(‘TForm1’);
Application.CreateForm(TFormClass(oFMXClass) ,oFMXForm );
oVCLClass := GetClass(‘TForm2’);
Application.CreateForm(TFormClass(oVCLClass) ,oVCLForm );
1° Open VCL Form: OK
2° Open FMX Form: OK
3° Open VCL Form: not found return nil