Jump to content

Featured Replies

Posted

Hi All,
i'm trying to show a new from from another with the code below :

FrmWait := TFrmWait.Create(nil);
TfgAnimationHelper.ShowForm(FrmWait);

The TfgAnimationHelper.ShowForm method lock the current Form when it exec the FrmWait.Create method.
I've tried to move my initializazion code from FrmWait.create to FrmWait.show but the initialization freeze the current form and only at the and i see the FrmWait. ( In windows environment i solve this problem with windows messages ).

Some one can help my ?
I'm following the wrong way ?

Thanks a lot

  • Author

Hi Yaroslav,
i attach my test project.

As you can see in the FrmLogin i call FrmWait with this code :

    FrmWait := TFrmWait.Create(nil);
    TfgAnimationHelper.ShowForm(FrmWait);

in FrmWait i've this method :

procedure TFrmWait.fgFormCreate(Sender: TObject);
begin
  TfgAnimationHelper.FadeOut(LblInfo, [TfgAnimationOption.StartFromCurrent], 0);

  LblInfo.Text:='Ciao Luca';
  TfgAnimationHelper.FadeIn(LblInfo, [TfgAnimationOption.StartFromCurrent], 500);
  Sleep(2000);
  TfgAnimationHelper.FadeOut(LblInfo, [TfgAnimationOption.StartFromCurrent], 500);

  sleep(500);

  LblInfo.Text:='Abbiamo quasi finito...';
  TfgAnimationHelper.FadeIn(LblInfo, [TfgAnimationOption.StartFromCurrent], 500);
  Sleep(2000);
  TfgAnimationHelper.FadeOut(LblInfo, [TfgAnimationOption.StartFromCurrent], 500);
end;

and this event freeze the current form.
I think i can fix with TfgCallBack from TfgAnimationHelper.ShowForm but i'm not sure and i don't know how to use it.

Thanks a lot.
FMX.7z

  • Author

Hi Yaroslav,
I've solved.

I've made a wrong usage of TfgAnimationHelper...
Thank you.

 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.