AlbertoVesx Posted June 6, 2017 Posted June 6, 2017 Sometime I have the following situation: I set the screenmask to btnTest, but after the user answer the messagedlg the screen mask desapears. I want that the screen mask remains after the messagedlg. How can I achieve this? procedure TfrmSomeForm.btnTestClick(Sender: TObject); begin Lines of code messagedlg() // Ask something to the user A lot of lines of code after messagedlg executing without screen mask end; Thanks 1 Quote
arilotta Posted February 19, 2019 Posted February 19, 2019 Hello, I need a solution too for the same problem. In the following code: procedure TMainForm.UniButton1Click(Sender: TObject); begin try ShowMask( 'blocking mask...'); unisession.synchronize; sleep(1000); showmessage('step 1'); sleep(1000); showmessage('step 2'); sleep(1000); showmessage('step 3'); finally HideMask; end; end; the mask disappears between step 1 and step 2. The same behaviour applies to MessageDlg and ShowModal... Is there a solution ? Blocking masks should remain until they are explicitely hidden with command HideMask, this is the reason for putting them in a try.. finally block.... Quote
Hayri ASLAN Posted February 21, 2019 Posted February 21, 2019 Hi Simply add @@ to enable mask! MessageDlg('@@are you sure',.............. 3 Quote
arilotta Posted February 21, 2019 Posted February 21, 2019 Hayri, thank you very much for the hint, I was unaware of the existence of @@ ! Quote
shawdown Posted February 21, 2019 Posted February 21, 2019 9 hours ago, Hayri ASLAN said: Hi Simply add @@ to enable mask! MessageDlg('@@are you sure',.............. Perfect. Thank you very much. I did not know either. I'll test log soon. Quote
mhmda Posted February 21, 2019 Posted February 21, 2019 2 hours ago, arilotta said: I was unaware of the existence of @@ ! Me too. Quote
Helmut Hort Posted September 14, 2020 Posted September 14, 2020 Works fine - but not the original screen mask text comes up but the message "Loading" appears. Quote
Hayri ASLAN Posted September 14, 2020 Posted September 14, 2020 8 hours ago, Helmut Hort said: Works fine - but not the original screen mask text comes up but the message "Loading" appears. In the one of the next build, we will improve this one. It is on our table now. 1 Quote
rhazell Posted January 6, 2022 Posted January 6, 2022 On 9/14/2020 at 11:45 AM, Hayri ASLAN said: In the one of the next build, we will improve this one. It is on our table now. Has this been addressed? Quote
vbdavie Posted February 27, 2024 Posted February 27, 2024 I have a similar problem. Instead of display a message (after my mask is enabled), i display a form for the user to pick an option. Then when the form is closed, the mask is GONE. How do i keep the mask active once the form is loaded and then closed? Thanks DAvie Quote
Sherzod Posted February 28, 2024 Posted February 28, 2024 11 hours ago, vbdavie said: I have a similar problem. Instead of display a message (after my mask is enabled), i display a form for the user to pick an option. Then when the form is closed, the mask is GONE. How do i keep the mask active once the form is loaded and then closed? Hello, I didn't quite understand your case. Quote
vbdavie Posted February 28, 2024 Posted February 28, 2024 okay. 1. the user clicks a buttons and i enabled the mask 2. the screen goes gray with a mask (good) 3. I do a bunch of logic 4. I do a bunch more logic (a little time consuming maybe 3 seconds) 5. I turn off the mask and the screen returns to normal (good) If I open a form in step 3 so that the user can pick some options, then when the form closes, the screen's mask is turned off. That means while step 4 is executing (maybe 3 seconds) the mask is off and the screen looks normal and the user THINKS he can click and do things when in fact step 4 is not done yet. Thanks DAvie Quote
Sherzod Posted February 28, 2024 Posted February 28, 2024 If possible, create a simple app that reproduces your case. Quote
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.