Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close internet windows
Message
De
05/04/2002 19:36:23
 
 
À
04/04/2002 04:34:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00640417
Message ID:
00641694
Vues:
34
>thank you for your answer.
>
>i have now another problem.
>i want to write a program that is started with windows and works in memory.
>whenever an IE instant starts this program is activate.
>how can i do it ?

You'll have to write a program that polls the instances of explorer in the collection that Ed pointed out. When have a need for something like this, I usually use the Sleep() function to run a loop with a delay:
DECLARE Sleep IN WIN32API Integer

DO WHILE .T.

oShell = CREATEOBJEC("Shell.Application")
oWIndows = oShell.Windows
FOR EACH oWindow IN oWIndows
  * The windows collection contains both IE instances and explorer instance
  * you can tell the difference because IE instances have "file..." in the locationURL property
  IF oWindow.LocationURL = "http"
    * Do something here
  ENDIF
ENDFOR
* Pause for one second
=Sleep(1000)
ENDDO
You can then compile this prg as an exe and create a registry entry at HKLM/Software/Microsoft/Windows/CurrentVersion/Run of the target machine that runs the app on startup.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform