Information générale
Catégorie:
Applications Internet
Erik,
You responded (in summary) with:
---------------------------------
oShell = CREATEOBJECT('Shell.Application')
oIECollection = oShell.Windows()
FOR EACH oIE IN oIECollection
* Do something here
ENDFOR
The Windows method returns a zero based collection of all open instances of Explorer (including instances of IE). You can check the LocationURL property to check for the presence of a URL that begins with "http://", and activate your app if there is one. Additional note- your application can use the handle acquired by the above code to manipulate the browser through its automation model.
The SHellobject is a COM interface to a lot of Windows interface elements. You need a relatively new version of SHell32.dll that ships with IE4, NT SP3 (I think), and all later versions of windows (including 98). Do a search here on shell32 for a thread on this a couple of weeks ago.
-------------------
I tried this on a Win98 machine with VFP5.0a, got no error, and a DISP MEMO showed me I was accessing SHELL AUTOMATION SERVICE, so my problem was an older Shell32.dll in my earlier attempts. I did the search for shell32 and found a reference to George Tasker's article in FoxPro Advisor and I'm running that down now. I also searched MS KB but found nothing helpful.
I need to know more about this service, how shell32 works, properties like "locationURL", and especially what I can plug into your code line, "* Do something here". Can you point me in a source for more info? This looks very interesting...
Thanks,
Allen
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement