Gustavo_GRSoft Posted April 22, 2023 Share Posted April 22, 2023 Hello my friends, i want to make a process in which the system switches messages when each part of the process is finished, but unigui does not show all the messages... MainForm.ShowMask('Salvando dados...'); UniSession.Synchronize; sleep(1000); MainForm.HideMask; MainForm.ShowMask('Criando banco de dados...'); UniSession.Synchronize; sleep(1000); MainForm.HideMask; MainForm.ShowMask('Finalizando...'); UniSession.Synchronize; sleep(1000); MainForm.HideMask; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 22, 2023 Share Posted April 22, 2023 Hello, Please see the documentaion and demos. http://unigui.com/doc/online_help/synch-and-asynch-operations.htm \Framework\uniGUI\Demos\Desktop\BlockingModals Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 22, 2023 Author Share Posted April 22, 2023 Ty my friend... Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 22, 2023 Author Share Posted April 22, 2023 one more question, I saw the example you asked me for, but when I call a modal form and I have a positive return, the message is above the form that was called, I would like the form to close first and only after that, the message appears. if UniForm5.ShowModal() = mrOK then ShowMessage('Completed'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 22, 2023 Share Posted April 22, 2023 Okay. Though you'd better avoid using Synchronous Mode. Use Asynchronous Mode and use callbacks, for example: \FMSoft\Framework\uniGUI\Demos\Desktop\Form Callback Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 22, 2023 Author Share Posted April 22, 2023 ty again my friend... 1 Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 23, 2023 Author Share Posted April 23, 2023 my friend, I got the demo and made a modification, but the showmask doesn't work, it stays behind the form Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 23, 2023 Share Posted April 23, 2023 Hello @Gustavo_GRSoft Don't use Synchronize. Try to use this code for example: procedure TMainForm.UniButton2Click(Sender: TObject); begin UniForm1.ShowModal(ShowCallBack); end; procedure TMainForm.ShowCallBack(Sender: TComponent; AResult:Integer); begin //UniMemo1.Lines.Add('Form: '+(Sender as TuniForm).Name+', Result: '+IntToStr(AResult)); if AResult = mrOk then ShowMessage('OK') end; Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 23, 2023 Author Share Posted April 23, 2023 I tried without sync and it didn't work... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 23, 2023 Share Posted April 23, 2023 37 minutes ago, Gustavo_GRSoft said: I tried without sync and it didn't work... 21 hours ago, Gustavo_GRSoft said: ShowMessage('Completed'); It works? Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 23, 2023 Author Share Posted April 23, 2023 the message yes, but the mask, no... Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted April 24, 2023 Share Posted April 24, 2023 Why not use Synchronize? Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted April 24, 2023 Author Share Posted April 24, 2023 any news about this problem? 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.