Share this page 

Start the default browserTag(s): WinAPI/Registry


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.