>Hi.
>
>I've used a modified RUN_WITH that uses the shell command. To open a file in another program. However, with some applications (micrographics designer..)
>I can't get the window to show in front of my application...
>
>It seems like I call the SHELL code to open the application and it comes up as normal but suddenly after loading the focus shifts back to our application...
>
>a)It seems like the code continues processing and sets focus back to the application. Is there a way to stop this?
>
>b) Is there a problem in VFP 7 with the application always remaining on top?
>
>Code works like this.
>Right Click Menu..
>Call:
> EditImage(oCtrl,oCtrl.aShadowPicts[nPopup-6,1])
> this does a ShellExecute...
> Menu Code Executes...
> Screen Activates...
>
> I can't use ShowWindow because I never can know what application title to search for...
>
>I realize the description is a bit vague but I'm finding this a little hard to follow...
>
>thanks
Tim,
I don't know what run_with is. However you say it's something that shellexecutes :)
For similar purpose I use a FLL to find and wait for it (a FLL for VFP doesn't support callbacks). However I think in your case you might do it in an easire way w/o need for callback support. Use FindWindow and SetForeGroundWindow or ShowWindow.
BTW I think using ShellExecute's last parameter (showwindow-1) you might not need all these.
FindWindow supports 2 parameters, window title and class. You could pass only the class (title null-0) and check for mic.des. window.
Cetin