Private Declare Function ShellExecute Lib "shell32.dll"
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String,
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As
String, ByVal nShowCmd As Long) As Long
Private Sub Form_Load()
Dim r As Long
r = ShellExecute
(0&, "open", "http://www.lexcentrics.com/default.htm", "", "", 0)
End Sub
Loads the specified page, using the default browswer, whatever and
wherever it is.
> Hi
>
> I want to shell the default browser from VB code with an url I specify.
>
> Right now I am using code like this:
>
> h1 = Shell("c:\program files\internet explorer\iexplore.exe " & strUrl &
> strQueryString)
>
>
> How can I get away with not having to know the full path name? - it may
be
> installed elsewhere.
>
> For that matter how does one find what browser is the default, if more
> than one is installed.
>
> Thanks
>
>