README.md

December 4, 2022 ยท View on GitHub

Open website with default web browser

Description

Open your default web browser with any url.

More Info

Submitted On
ByMichael Boiko
LevelIntermediate
User Rating5.0 (10 globes from 2 users)
CompatibilityVB 5.0, VB 6.0
CategoryInternet/ HTML
WorldVisual Basic
Archive File

Source Code

Create a new module and put this code into it <p>
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<p>
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