VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Open file/website to default editor/browser

by PalotasB (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 14th April 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Open file/website to default editor/browser

Rate Open file/website to default editor/browser



"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()
'       If the file doesn't exist no error occures
'       Just change Filepath to another file on your HD or
'       to a website to shell default browser. Example:
'
'   FilePath="http://www.microsoft.com"
    FilePath = "c:\Example.txt"
    OpenFileDefault hwnd, "open", FilePath, vbNullString, _
    vbNullString, 1
End Sub


Download this snippet    Add to My Saved Code

Open file/website to default editor/browser Comments

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

Post your comment

Subject:
Message:
0/1000 characters