سؤال

I need to show a message in a wait window with a timeout. I have managed to do so with the following code:

wait window 'Message Here...' timeout 1

If this window is clicked however the message will disappear. Instead I would like to have something similar however in such a way that if the user clicks on the message nothing will happen and the message will stay visible (i.e. message will only close once the timeout expires).

Can somebody please help me out here? I wouldn't mind having something similar (such as a messagebox) which carries out the same function.

هل كانت مفيدة؟

المحلول 2

It sounds like you want to display a message and make the user wait XX number of seconds before they can continue. If that is the case, then you could do something like this.

LOCAL ltMessageTimeOut
m.ltMessageTimeOut = DATETIME() + 5

DO WHILE DATETIME() < m.ltMessageTimeOut
    WAIT WINDOW "Display Some Message" NOCLEAR TIMEOUT 1
ENDDO

WAIT CLEAR

نصائح أخرى

Try the Visual FoxPro MessageBox() function. This function has an optional timeout parameter. Setting the timeout parameter causes the message box to stay on the screen for that about of time or until the user clicks a button on the message box.

Read more about it here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top