Mandy,
If you really want the timeout, you have several choices:
1. Create your own message box. This would be a simple modal form that contains the text, icons and buttons that you want. You can add a timer to make it time out after a given number of seconds. This will avoid the problem that you are seeing.
2. Use Cesar's message box, as recommended by Koen and others (see above).
3. Use a Wait Window instead of a message box. It is not so prominent, but it is easy to implement, and the timeout won't cause any additional problems.
Now having said that, I must ask if you really need a timeout. There are several reasons
not to use a timeout with the built-in message box:
1. The fact that the message box has its own taskbar button, which could lead to the message appearing behind other parts of your application, giving the user the impression that the application is hanging. (I assume this is what you are seeing.)
2. This sort of message box prevents any timers elsewhere in your application from firing. If you don't have any timers, it won't be a problem. But, if you do, it could cause significant problems.
3. Most important: it is a lousy user interface feature. Just think about that. You are giving your users a message to read. They start reading the message, but suddenly and without any warning the message disappears from the screen, possibly before they have finished reading it or absorbing its meaning. Is that a friendly way to communicate with your users?
Just something for you to think about.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads