I am currently using LicenseFile=
Is there a way to add a timer to the next button? That way if a certain time period hasn't elapsed it will ask the user if they have actually read the agreement?
Thanks
I am currently using LicenseFile=
Is there a way to add a timer to the next button? That way if a certain time period hasn't elapsed it will ask the user if they have actually read the agreement?
Thanks
There isn't anything built-in, but you can call the standard WinAPI GetTickCount
function:
function GetTickCount(): Cardinal;
external 'GetTickCount@kernel32.dll';
Call it once from CurPageChanged(wpLicense)
to save the current tick value in a global variable, and then again from NextButtonClicked(wpLicense)
and subtract the new tick from the old tick to get the elapsed time.
Two points to note, however:
Just because the page has been open for a while doesn't mean that they've actually read it.
I haven't tested but I'm pretty sure NextButtonClick
will be called even if they haven't selected "yes" (ie. the code handler is called before the internal validation). So you may want to check for this too, to avoid displaying the "have you read it?" message when they haven't even ticked Yes yet.