>The focus switches to another open window. How do I keep focus on the scanning application main window? I'm calling vfp executable from another vfp application. The scanning application has a main form with the activex control on it. Once scanning begins, the focus switches to the most recent open\active window such as excel or email. I wish focus to stay on the scanning application until i have completed processing.
If this ActiveX control does some free games on the background that generates such a situation, you might want to workaround it by adding a timer, for example, which would put the focus back to your VFP application. You may only need to have it run once if the focus is only lost once. Otherwise, you might have to implement something more robust.