>I have an "on shutdown" routine that cycles through all forms and attempts to close them. If a form detects uncommitted changes to any data, it prompts the user if they will like to save or discharge them.
>
>The problem is that if the user is still in a textbox where changes have made but then they click the upper right "X" (to shutdown the app). The focus isn't taken off the textbox so the buffer doesn't know about the change in the contents of the textbox. How can I shift the focus off the textbox or force the changes into the buffer?
I use _VFP.ActiveForm.ActiveControl.SetFocus, so the current control loses focus to regain it! :-)
Sylvain Demers