Gustavo.deo Posted December 11, 2017 Share Posted December 11, 2017 I'm trying to use Free Form in the application ...But when using the code below, it does not showmodal, going straight through to the next instruction ...I already tried the following options .. var fTeste : TfTeste; begintry fTest: = TfTeste.Create (UniApplication); fTeste.Showmodal;finally FreeAndNil (fTest);end;and I already tried var fTeste : TFteste; begin fTest: = TfTeste.Create (UniApplication); fTeste.Showmodal; FreeAndNil (fTest);..Can someone help me??? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted December 11, 2017 Share Posted December 11, 2017 See the mega demo on Unigui directory. Also : http://www.unigui.com/resources/online-documentation/developer-manual Developer's Guide > Application Design Considerations > Dynamically Created Controls > Quote Link to comment Share on other sites More sharing options...
albertovesx Posted December 11, 2017 Share Posted December 11, 2017 If you are not using synchronous operations equal to true, you are freeing the form very quickly because the execution continue and the finally code is executed. You must use syncronous operation or callbacks Quote Link to comment Share on other sites More sharing options...
Gustavo.deo Posted December 11, 2017 Author Share Posted December 11, 2017 but I call showmodal, should not stop until I close the screen, and just continue ???? how should I do to wait for me to close the screen to proceed ??? thank you!!! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 12, 2017 Share Posted December 12, 2017 Hi, http://www.unigui.com/doc/online_help/synch-and-asynch-operations.htm Quote Link to comment Share on other sites More sharing options...
Gustavo.deo Posted December 12, 2017 Author Share Posted December 12, 2017 Hi, http://www.unigui.com/doc/online_help/synch-and-asynch-operations.htm Hello ... Thank you in advance for your attention ... i I made the code fTest: = TfTeste.Create (UniApplication); if fTeste.ShowModal = MrOk then FreeAndNil (fTest); But it did not work the way I need it .. I need it when calling ShowModal, stop the execution and only go to the next execution lines, when the fTest screen is closed ... I need this, because after closing the screen and before destroying the form of memory, I will have other objects to be treated ... How can I do it??? Thank you!!! Quote Link to comment Share on other sites More sharing options...
albertovesx Posted December 12, 2017 Share Posted December 12, 2017 Hello ... Thank you in advance for your attention ... i I made the code fTest: = TfTeste.Create (UniApplication); if fTeste.ShowModal = MrOk then FreeAndNil (fTest); But it did not work the way I need it .. I need it when calling ShowModal, stop the execution and only go to the next execution lines, when the fTest screen is closed ... I need this, because after closing the screen and before destroying the form of memory, I will have other objects to be treated ... How can I do it??? Thank you!!! For this case you must set to true EnableSyncronousoperations in datamodule. or use showmodal(procedure(sender: Tcomnponent: res: integer)begin //somecode here; end); Quote Link to comment Share on other sites More sharing options...
Gustavo.deo Posted December 15, 2017 Author Share Posted December 15, 2017 Yes... Work.... Thank you!!! Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted December 15, 2017 Share Posted December 15, 2017 Gustavo, you have taken a big step. now everything is possible ! Have fun with unigui 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.