Luke Posted July 1, 2020 Share Posted July 1, 2020 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 Quote Link to comment Share on other sites More sharing options...
Administrators Yaroslav Brovin Posted July 1, 2020 Administrators Share Posted July 1, 2020 Hello Luke, Do you have demo sample? Thank you Quote Link to comment Share on other sites More sharing options...
Luke Posted July 1, 2020 Author Share Posted July 1, 2020 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 Quote Link to comment Share on other sites More sharing options...
Luke Posted July 1, 2020 Author Share Posted July 1, 2020 Hi Yaroslav, I've solved. I've made a wrong usage of TfgAnimationHelper... Thank you. Quote Link to comment Share on other sites More sharing options...
Administrators Yaroslav Brovin Posted July 1, 2020 Administrators Share Posted July 1, 2020 The library is asynchronous in General. So if you use Sleep you freeze application main event loop. Please, consider using callbacks and events model for do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.