Opening a website, in default browser - is it possible?
Hey, I'm just wondering if it's possible if I can open a website in a web-browser using your default browser. VB opens in IE, but I really need it to open in Mozzila Firefox (my default browser)
If this is possible, how would I be able to make it into a webbrowser in visual basics?
Re: Opening a website, in default browser - is it possible?
Use the ShellExecute() API
Re: Opening a website, in default browser - is it possible?
I dont really know what you mean, could you give me a quick example?
Re: Opening a website, in default browser - is it possible?
Like so
VB Code:
Public 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
ShellExecute hWnd, "open", "http://www.vbforums.com/", vbNullString, vbNullString, 1
Re: Opening a website, in default browser - is it possible?
http://img78.imageshack.us/img78/8228/error4wo.gif
I seem to get this error. Even after I put this coding in a completly blank forum :(
Re: Opening a website, in default browser - is it possible?
Code:
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()
ShellExecute hWnd, "open", "http://www.vbforums.com/", vbNullString, vbNullString, 1
End sub
Re: Opening a website, in default browser - is it possible?
Re: Opening a website, in default browser - is it possible?