>re: two command buttons launch two sub-routines
>
>As Ed mentioned, recoordinating two RUNning processes would be difficult.
>
>If these buttons launch routines that can run without user intervention and then terminate (ie: gather/report function) Or if the buttons are spawning completely self-contained programs (It would appear to be an MDI not contained in the parent window) You could easily use run.
>
>Button1.click: !/N2 Sub1.exe **gathers data1 & spools report
>Button2.click: !/N2 Sub2.exe **gathers data2 & spools report
>
>(/N2 = nowait active and minimized, see "HELP RUN")
Coordinating multiple VFP sessions is doable though - you need to plan ahead to let the separate instances pass messages and check each other's states conveniently. A shared table, where each session registers itself and posts its current state, is an easy mechanism to start with, since it uses native VFP structures and commands, and works well both locally and remotely. COM servers are another approach. And MSMQ is an option as well. Other API-based solutions that allow for very intimiate control are available, too, Christof Lange, the author of STRUCT, a library that makes many of the things in the Win32 API easier to use by letting VFP build and decompose C structures, mentioned that he's done some MUTEX using STRUCT and the API a few months back.
The key issue is picking a mechanism beforehand, and understanding the messaging and coordiantion required to perform synchronization.