|
-
Jun 11th, 2005, 04:31 PM
#1
Thread Starter
Junior Member
open webpage in default browser problem [Resolved]
ok, i want to get a webpage to open up in the default browser when you click a button. i found this code from the codebank.
VB 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 OpenURL(strURL As String)
ShellExecute Me.hWnd, "open", strURL, vbNullString, "C:\", ByVal 1&
' Change the last perameter to 0& if you do not whant to show the window.
End Sub
i cant get this to work. and im wondering if anyone could lend a hand?
Last edited by Bored Teenager; Jun 11th, 2005 at 05:51 PM.
Thanks for the help
- Bored Teenager -
-
Jun 11th, 2005, 05:01 PM
#2
Re: open webpage in default browser problem
Do you get an errors when executing the code?
-
Jun 11th, 2005, 05:12 PM
#3
Re: open webpage in default browser problem
VB Code:
ShellExecute hWnd, "open", "http://www.google.com/", vbNullString, vbNullString, conSwNormal
-
Jun 11th, 2005, 05:15 PM
#4
Banned
Re: open webpage in default browser problem
I posted this a few hours ago.
-
Jun 11th, 2005, 05:43 PM
#5
Thread Starter
Junior Member
Re: open webpage in default browser problem
thanks i got it to work with the code ThaRubby supplied.
Thanks for the help
- Bored Teenager -
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
|