VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Open website with default web browser

by Michael Boiko (1 Submission)
Category: Internet/HTML
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

Open your default web browser with any url.

Rate Open website with default web browser

Create a new module and put this code into it 


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


Public Const conSwNormal = 1
Put a command button on the form and put this code into it Private Sub Command1_Click()
ShellExecute hwnd, "open", "http://www.google.com", vbNullString, vbNullString, conSwNormal
End Sub

Download this snippet    Add to My Saved Code

Open website with default web browser Comments

No comments have been posted about Open website with default web browser. Why not be the first to post a comment about Open website with default web browser.

Post your comment

Subject:
Message:
0/1000 characters