VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How to open a Windows Explorer(Cabinet Class) or any file with its default applicat¨on.

by Abdel Yasid Larios (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 25th January 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

How to open a Windows Explorer(Cabinet Class) or any file with its default applicat¨on.

Rate How to open a Windows Explorer(Cabinet Class) or any file with its default applicat¨on.





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 Const SW_SHOWNORMAL = 1

'Write the path in the text box and clic in Command1

Private Sub OpenWin()
Dim r As Long
 r = ShellExecute(Me.hWnd, "Open", _
 Text1.Text, "", "", SW_SHOWNORMAL)

End Sub

Private Sub Command1_Click()
 OpenWin
end sub

Download this snippet    Add to My Saved Code

How to open a Windows Explorer(Cabinet Class) or any file with its default applicat¨on. Comments

No comments have been posted about How to open a Windows Explorer(Cabinet Class) or any file with its default applicat¨on.. Why not be the first to post a comment about How to open a Windows Explorer(Cabinet Class) or any file with its default applicat¨on..

Post your comment

Subject:
Message:
0/1000 characters