Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

This method of the hyperlink object tells the associated browser to go to a particular address. If the hyperlink is on a stand-alone VFP form, a new instance of the default browser is invoked; if the hyperlink is on an Active Document, that browser host is redirected.

Usage

oHyperLink.NavigateTo(cLegalAddress)

Parameter

Value

Meaning

cLegalAddress

Character

Any legal address that could be accepted by a browser: http:, ftp:, news:, mailto:, or a local file: address.

NavigateTo invokes a specified address. If the hyperlink object is within an Active Document hosted in a browser, that browser seeks the new address. If the hyperlink is in a VFP stand-alone application, the operating system is called to handle the hyperlink, typically starting the default browser and bringing up the specified link. On our systems, even if a browser is already open, the hyperlink call always starts a new browser. If this isn’t the behavior you want, you’ll probably have to look to Automation to get it working your way.

Specifying a mail address ("mailto:someperson@somedomain.com") correctly displays a New Message dialog but also brings up the browser with an "action canceled" or "Web page unavailable offline" page (depending on whether you're working online or not). That behavior makes this method pretty useless for this purpose.

Example

oLink.NavigateTo("http://msdn.microsoft.com/vfoxpro")
oLink.NavigateTo("news://msnews.microsoft.com")

See Also

Hyperlink, GoBack, GoForward