TAdvSmoothDock In a form having a parent

Actually we use the component AdvSmoothDock in our application.
With BDS XE and the 1.1.0.4 version of the component the application run well.
With BDS XE2 and the 1.1.2.4 version of the component the application doesn't run well.

To reproduce the error we have built a simple projet.
The first form of the project builts the second form.
In the second form we put one AdvSmoothDock component.
When the application is running :
 we construct the second form.
 we destruct the second form.
 we construct the second form.  => Then the application crash.

The code in the button for construct the second form is :
    if (l_FenTest != NULL) {
        delete l_FenTest;
        l_FenTest =  NULL;
    }
    // Creation et embeded de la fenetre
    l_FenTest = new TForm3(this);
    l_FenTest->Parent = Panel1;
    l_FenTest->Align = alClient;
    l_FenTest->BorderStyle = bsNone;
    l_FenTest->Show();

The code in the button for destruct the second form is :
    if (l_FenTest != NULL) {
        delete l_FenTest;
        l_FenTest =  NULL;
    }

We have tried many solutions but nothing works well.
Have you a solution in order to solve this problem.

We have a simple project if it can serve.

Thanks in advance.
Jean-Marie

Please provide the project so we can investigate this here.


Kind Regards, 
Scheldeman Pieter

Hi,
You can upload two projects in a zip file at the adresse : www.jtfinformatique.fr/docs/jmd/project.zip

The project2 is Ok. The form2 has Form1 as parent.
The project3 is Nok. The form2 has Panel1 from Form1 as parent.

In order to reproduce the bogue.
Run Project3\Win32\Debug\Project1.exe
Clic on the Button1
Clic on the Button2
Clic on the Button1
Then the application crash.

I hope this can help you.

Jean-Marie DOPPLER

Did you set the AdvSmoothDock component on a panel? The AdvSmoothDock must be placed directly on the Main form and does not support begin reparented on another form.


Regards, 
Scheldeman Pieter

Hi,
In the project the SmoothDock parent's is a TPanel component.
We have tried many solutions.
In the code of the Button1 Click we have done :
 AdvSmoothDock1->Parent = Form1; (and not Panel1)

This works with the 1.1.0.4 version of the component (XE)
This doesn't work with the 1.1.2.4 version of the component (XE2)

You have done modifications in the component between the two versions. And those modifications generate a disfunction.

Is there a solution to delete the AdvSmoothDock component without destroying the main form.

Jean-Marie DOPPLER

Hi,
We want to used XE2 but we still have the problem with the component TAdvSmoothDock.
In our XE project we can used the component in a form attached at a TPanel (more than 40 forms)
We can't migrated the project in XE2 because we are blocked by this component.

We have tried to install the older version of the TAdvSmoothDock but there are some errors. There is an incompatibility with other packages.

Have you got a solution ?

Jean-Marie DOPPLERHi,

Sorry, Reparenting of the TAdvSmoothDock is not supported. Please place the component directly on the main form.

Hi,
THis is not a good new.
We have a question.
With XE and the version 1.1.0.4 we can make a project with one form.
On this form we have put a TAdvSmoothDock
On this form we have put a TButton.
On the clic even of the TButton we have do : delete TAdvSmoothDock1
This project works fine.

If we make the same project in XE2 and the version 1.1.2.4, the project doesn't work. The form is invalid we must use Ctrl+Alt+Del and kill the process.

If we have a solution to delete dynamicaly the component we can have a solution to migrate in XE2.

Kind Regards,
Jean-Marie

Perhaps you could try the following to try and free the TAdvSmoothDock:


  AdvSmoothDock1.FormHookDone;
  AdvSmoothDock1.Free;

This should solve the issue in XE2 where the project hangs.

Kind Regards, 
Scheldeman Pieter

Hi,
Your solution is Ok. We have tried it and the project works fine.

Thanks for your help

Jean-Marie DOPPLER