|
-
Jul 18th, 2005, 09:51 PM
#1
Thread Starter
Member
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?
-
Jul 18th, 2005, 09:53 PM
#2
Re: Opening a website, in default browser - is it possible?
Use the ShellExecute() API
-
Jul 18th, 2005, 10:00 PM
#3
Thread Starter
Member
Re: Opening a website, in default browser - is it possible?
I dont really know what you mean, could you give me a quick example?
-
Jul 18th, 2005, 10:01 PM
#4
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
-
Jul 18th, 2005, 10:12 PM
#5
Thread Starter
Member
Re: Opening a website, in default browser - is it possible?

I seem to get this error. Even after I put this coding in a completly blank forum
-
Jul 18th, 2005, 10:14 PM
#6
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
-
Jul 18th, 2005, 10:21 PM
#7
Thread Starter
Member
Re: Opening a website, in default browser - is it possible?
Thank you vm
-
Jul 18th, 2005, 10:23 PM
#8
Re: Opening a website, in default browser - is it possible?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|