Try using a public variable such as 'glFormHasFocus' in form1, set to .F. when calling form2, and set to .T. when destroying form2. Then in the Refresh of the controls on form1, put This.Enabled = glFormHasFocus. This will work whether the forms are modal or not.
May not be the best, but I use it very effectively in my forms, the same as ENABLING command buttons when in Edit Mode on a form.
Adam
Adam J Skowronski