>And second reason: the product leave already about 8 years (it was started, I belive, in FoxPro 2.x). It's absolutely impossible to rewrite whole code to avoid a VFP b... feature.
Well, to fix it can be done, once you find the proper way to do it, in the form that you want to restrict access to it. I assume that as you want to make it modal. Or, if this is the same in more than one form, then, you will only have to change the base class for the adjustment. I assume all of your forms sit on a base class form.
As I said, never, IMHO, a form should remain on screen with a modal status if the control is being given to another form. Modal is modal. So, if you wish a form to remain on screen and gave control to another form, remove modal from the related form. Then, as I assume, if you wish to restrict access to the related form, while you are in another form, just put some code where appropriate to avoid that form to respond to a user's click or any other user's operation to that form.