|
-
Nov 8th, 2004, 04:57 PM
#1
Thread Starter
New Member
-
Nov 8th, 2004, 05:03 PM
#2
i believe that you can use SHELL "url" or SHELL "http\\:url" to open the link with the default browser.
Last edited by dglienna; Nov 8th, 2004 at 05:11 PM.
-
Nov 8th, 2004, 05:05 PM
#3
Fanatic Member
Is this what you want?
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
Const SW_SHOWNORMAL = 1
Private Sub Label1_Click()
ShellExecute Me.hwnd, vbNullString, "www.google.com", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
-
Nov 8th, 2004, 05:27 PM
#4
Thread Starter
New Member
thanks laserman, that worked.
-
Nov 8th, 2004, 05:28 PM
#5
Fanatic Member
Very welcome
-
Nov 8th, 2004, 06:59 PM
#6
Thank's for letting us know your question was answered, but when you edit the Subject, just add the [Resolved] rather than replacing the whole subject.
-
Nov 8th, 2004, 07:04 PM
#7
Software Eng.
Another method is to use VB's Shell method, and pass the website as the command-line argument.
I.e.
Note: This method assumes you want to specifically open it in Internet Explorer. To open with the default browser, stick with ShellExecute
-
Nov 8th, 2004, 07:18 PM
#8
just played with SHELL. You have to specify the pathname with the explorer. just the url doesn't open the browser, like I thought. shellexecute seems to be the best bet.
sorry. should have tested it first.
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
|