Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP.exe to different VFP.exe
Message
De
19/02/2021 10:55:37
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01678195
Message ID:
01678439
Vues:
68
Hi Rick

I managed to get the list of processes fine. The complete problem is the user pinned the launcher to the taskbar, and then when we launch the .exe, it creates a second icon on the taskbar. If the launcher uses DO to start the exe, there is only one icon on the desktop.


>You'll want to get a process list which you can get with:
>
>* .NET (using the Process class)
>* WMI
>
>If you're using West Wind Tools there's an example in the `wwDotnetBridge` samples folder getting a process list (actually I think in the open source version on GitHub as well).
>
>
>WMI: Here's some code I've used before to find a process to kill using WMIT. The process class returned is `W32_PROCESS` and it has all the info like start folder environment etc.
>
>+++ Rick ---
>
>>>Hey all
>>>
>>>I am trying to have a launcher find a running vfp.exe (call it target.exe) and switch to it, if it has the right startup folder. If not, I want to launch that one. I can find examples to get the target exe by window title. That won't work as the app changes the title frequently.
>>>
>>>I think I want to access the _docmd of the target.exe so I can check if it is the correct target.
>>>
>>>So I want to iterate through all running targets, but check their startup folder. If none are running, or not the one for this particular folder, then I want to start them. I already have the way to start them with shellexecute.
>>
>>AccessibleObjectFromWindow seems helpful.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform