Code:Public 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 SW_SHOWNORMAL = 1 Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub Private Sub File1_DblClick() If Len(Dir1.Path) <= 3 Then d = Dir1.Path & File1.filename If Len(Dir1.Path) > 3 Then d = Dir1.Path & "\" & File1.filename ShellExecute Me.hwnd, vbNullString, d, vbNullString, "c:\", SW_SHOWNORMAL End Sub




Reply With Quote