Jump to content

Recommended Posts

Posted

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

 

  • Upvote 1
  • 1 year later...
Posted

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....


 

Posted
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.

  • 1 year later...
Posted
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.

  • Upvote 1
  • 1 year later...
Posted
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? 

  • 2 years later...
Posted

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

Posted
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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...