Manuch clearly agrees with us about the use of MessageBox() in this situation.
Regarding the nTimeout parameter: I note that Manuch is not recommending you to use that, which is good. But I would go further, and argue that you should
never use a timeout with a message box, for the following reasons:
1. When you use the timeout parameter, the message box opens with a separate button on the Windows taskbar. If the user then clicks anywhere else in your application, the application's window will come to the front, hiding the message box. But the message box is still active at this point, and the application is still in a modal state. So if the user doesn't realise what is happening, they will assume the application has frozen.
2. When a message box with a timeout is active, any timers in your application will fail to fire.
3. Most importantly, it's a lousy user interface. You're saying to your user: "Here's some important information you need to read. Oops. Too late. You didn't read it in time, so I'm going to take it away." It's not exactly going to endear you to your users.
As far as I remember, the only time I have ever used a timeout with a messagegox is when the program needed to force a user out of the system when they left it running overnight and the admin needed to close it down so that they could get exclusive use. Even then, a custom form with a timer might have been a better option.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads