Antonio
May general impression is, that because of the moment you call the MESSAGEBOX, the normal event sequence is broken. For that the object that gets focus will not recieve the focus the way you think it should. I can not express how I dislike your aproach with the messageboxes in that moment - but it's up to you. At least consider a different way to solve your problem - at least if there is such an urge to have a messegbox while you move the focus. Possibly you can simply switch properties as enabled / readwrite / visible, caption or something to express the stuff you have in your messagebox.
I can not encourage you to THISFORM.REFRESH over and over, in special in crowded forms this might slow down VFP. That's way I've used the property for the messagebox that recieves the focus. Been through this.
In an other solution you might to use the timer to display the Messagebox, moving the message through a property of the timer. This removes the need of refresh at all, and the event sequence is not broken. Then even the item clicked will be activated.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]