Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running IE with VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00321928
Message ID:
00321938
Vues:
14
>Hi all
>
>I'd like to run IE from a menu in one of my applications that calls IE and then navigates to a specific web address. In my last message (which heaps of people responded to) I got some really good feedback - but unfortunately I didn't understand much of it! I've tried to use the ShellExecute() command without much success...
>
>Does anyone have some sample code that I could perhaps "borrow" that calls IE and navigates the user to a web address????
>

The easiest way to do this would be to use the Shell.Application automation object; going to a URL is as simple as:

oShell = CREATEOBJ('Shell.Application')
oShell.Open('http://www.levelextreme.com')

This pretty much assumes that IE4 or later is installed; if it is, it's virtually certain that Shell.Application is there.

You can also install the WebBrowser ActiveX control, or use the FFC ShellExecute class rather than relying on the services of Shell.Application, or any of dozens of other options. Once opened, you can hook the instance of IE that you fired up via the Shell.Application's Windows collection.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform