FoxPro command wait

The command wait allows you to interrupt the program and show a message. This can be one or more lines long. When you open the Microsoft help link below, you get a complete description of the command. It is a very useful and you should play a bit with the included examples.

The message automatically disappears on a mouse click or a keyboard input. If this input is a printable key from the keyboard, you can save it to a varibale. (see example "Wait 1"). If you omit to variable_name) the input which removed the wait message is not saved. The examples and the original help info should make it easy to play with the command.

One pitfall to mention: the mouse click or keyboard input removing the wait window is lost! Hence, when the user of your program is typing in data or pointing with the mouse might not even realize the wait window and just gets the impression, that one of the keystroke was not recorded or the program did not react on the mouse click. Hence, if you need to interrupt the program to wait for an input, use a the function messagebox()

See the Microsoft help for further use of the FoxPro® command wait.

Microsoft help: wait