Search code examples
delphiwinapidelphi-xe2gdi

AnimateWindow with Delphi XE2


Hello I have a problem with the AnimateWindow function in Delphi XE2, the problem is when I use the skins offered XE2 found in the windows appearances, when using a skin any and combined with AnimateWindow, the program blends the normal design of the windows of part of the window with skins, the worst is that the window is frozen and can not move more. The code is only this:

procedure TForm1.FormCreate(Sender: TObject);
begin
  AnimateWindow(Form1.Handle,200, AW_CENTER);
end;

How do I fix this?


Solution

  • The problem seems to exist in all versions that provides 'Styles' (XE2 .. X Seattle) and can easily be repeated as follows:

    • New VCL project
    • Project Options - Appearance - Any available style

    Add code as in the question

    procedure TForm2.FormCreate(Sender: TObject);
    begin
      AnimateWindow(Form2.Handle,200, AW_CENTER);
    end;
    

    And run. The window appears on the screen but is totally unresponsive. Controls on the window do appear to work normally (so far only minimal testing).

    A workaround is to set the Position property to something else than the default poDefault.

    Embarcadero quality central search did not bring up any report. I will file a report after I do some more investigation.


    Reported, RSP-13459, Window with style applied freezes on call to AnimateWindow


    Update 24.4.2016 Yesterday I received a notification regarding RSP-13459:

    This issue is fixed for 10.1 Berlin, it does not reproduce it with build 24.0.22088.5349.1.