Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to launch a Web Browser from VFP

Status
Not open for further replies.

RichardH

Programmer
Apr 21, 2001
46
0
0
US
Is there a way to launch a web browser and go to a selected url. I am using VFP6 and I would like to have a field on a form for “Website”. Then if the user clicks on the field (or a command button next to it), the browser will start and take them to the website.

Thanks...Rick
 
Hi my friend
Use this code to do that...
Code:
OIE=createObject("InternetExplorer.Application")
OIE.navigate("[URL unfurl="true"]www.Hotmail.com")[/URL]
OIE.visible=.t.
Thanks Walid Magd
Engwam@Hotmail.com
 
You also need to release it when you are done. You can use the following, which I believe works for whatever you default browser is (IE, Netscape, whatever) I think. Anyway, here is the code:

oShell = CREATEOBJECT( 'WScript.Shell' )
oShell.Run( " )
oShell = .NULL.
RELEASE oShell
 
There is a beautifull class in VFP called "hyperlink".

ox = CREATEOBJECT('hyperlink')
ox.navigateto('
HTH,
Weedz (Wietze Veld)
veld4663@exact.nl
The Netherlands

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top