Jump to Real's How-to Main page

Start the default browser

There are many ways to start a browser from PB.

You can use the file association (see previous How-to).

Specify the browser executable path :

string url,fix
SetNull(url)
theBrowser = '"C:\Program Files\Internet Explorer\iexplore.exe" -nohome'
theUrl = sle_1.text
IF NOT IsNull(theUrl) THEN
    Run(theBrowser + " " + theUrl)
END IF
With PB v6, the new Internet object provides some facilities to accomplish this.
string url
inet iinet_base

url = sle_1.text
GetContextService("Internet", iinet_base)
iinet_base.HyperlinkToUrl(url)
See this How-to for Internet Explorer specific snippets.
If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]