![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Fri, Jul 8 2016 4:31 PM | Permanent Link |
Trinione | First is a question:
How to progmatically close MessageDlg ? ------------------------------------------------------------------------------------ Second is an observation / bug. I provide a warning before logging out user. Whilst testing the functionality I just noticed that upon setting the timeout to the same value it was previously it does not work the second time. procedure Tfrm1.AppOnIdleWarningEvent (Sender: TObject); begin ShowMessage('Ahhh!'); Application.IdleTimeout := 6; //300; Application.OnIdle := AppOnIdleLogoutEvent; MessageDlg('You will be disconnected soon. Stay connected ?', 'Inactivity detected', mtConfirmation, [mbYes,mbNo], mbNo, TimeoutWarning, True); end; procedure Tfrm1.AppOnIdleLogoutEvent (Sender: TObject); begin ShowMessage('Hmmmmm!'); LogoutNow; end; procedure Tfrm1.CheckTimeoutWarning(DlgResult: TModalResult); begin if (DlgResult = mrNo) then LogoutNow else SetAppTimeout; end; procedure Tfrm1.SetAppTimeout; begin Application.IdleTimeout := 5; //600; Application.OnIdle := AppOnIdleWarningEvent; end; |
Fri, Jul 8 2016 6:40 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << How to progmatically close MessageDlg ? >> You can't. If you want that level of control, then you should create your own message dialog form (use TMessageDialog as the ancestor class instead of TForm). << I provide a warning before logging out user. Whilst testing the functionality I just noticed that upon setting the timeout to the same value it was previously it does not work the second time. >> The OnIdle event is a one-shot deal. Once it fires, it won't fire again until any mouse/touch/keyboard events occur and it starts the countdown again. Tim Young Elevate Software www.elevatesoft.com |
Sat, Jul 9 2016 6:28 AM | Permanent Link |
Matthew Jones | Tim Young [Elevate Software] wrote:
> The OnIdle event is a one-shot deal. Once it fires, it won't fire > again until any mouse/touch/keyboard events occur and it starts the > countdown again. That's a detail that might be worth putting in the manual as it could be handy to know. It is sort of obvious, but also not. -- Matthew Jones |
Sat, Jul 9 2016 11:29 AM | Permanent Link |
Trinione | << The OnIdle event is a one-shot deal. Once it fires, it won't fire again until any mouse/touch/keyboard events occur and it starts the countdown again. >>
Tim: In the sample code I gave above, both should be at '5' for example. However, the code works with different times set. So, when I change the second one to say '10' seconds, it works. I can live with that. Just wanted to point it out in case others came across this issue and were searching on it. |
Mon, Jul 11 2016 8:43 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< That's a detail that might be worth putting in the manual as it could be handy to know. It is sort of obvious, but also not. >> I updated the docs to reflect this. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, May 29, 2023 at 11:23 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |