Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close internet windows
Message
From
05/04/2002 19:36:23
 
 
To
04/04/2002 04:34:17
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00640417
Message ID:
00641694
Views:
33
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform