Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic VFP form on http connection
Message
From
06/12/1999 20:52:51
 
 
To
06/12/1999 19:07:48
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00299303
Message ID:
00299492
Views:
23
>>I have a client that wants a tool bar (or VFP form) to appear whenever an http connection is made through the internet. The tool bar or form would have selections for http links to various web pages. I know how to activate links from VFP through shellexec, but don't know how to launch the FVP app automatically. I would suppose the only way to do it is to have the VFP program running in the background, initiated at startup, and watching for some Windows system variable or the appearance of a particular window like MSIE or Netscape. Maybe there's a way to connect one Windows program to another so that when one launches the other follows...
>>
>
>The only way I know of to do this would be to launch an app in the background that runs a timer and polls for the presence of an IE instance. As Ed Rauh pointed out recently, you can use the Shell.Application object to do this:
>
>oShell = CREATEOBJECT('Shell.Application')
>oIECollection = oShell.Windows()
>FOR EACH oIE IN oShell
> * 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.

Woops, I fudged my FOR loop code- that line should read:

FOR EACH oIE IN oIECollection
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform