Open Windows Explorer to display files in a specific directory in Visual Basic 6

 
TitleOpen Windows Explorer to display files in a specific directory in Visual Basic 6
DescriptionThis example shows how to open Windows Explorer to display files in a specific directory in Visual Basic 6.
KeywordsWindows Explorer, shell, open, files, Visual Basic 6
CategoriesFiles and Directories
 
When you click the program's button, it builds a string of the form:
    explorer.exe /e, C:\somedir\subdir
and executes this command with Shell.
 
Private Sub btnOpenWindowsExplorer_Click()
Const QUOTE As String = """"
Dim path As String

    path = Replace(txtPath.Text, QUOTE, QUOTE & QUOTE)
    Shell "explorer.exe /e, " & path, vbNormalFocus
End Sub
 
 

Komentar

Postingan populer dari blog ini

Login, Session, dan Logout

Cara Membuat File Setup / Installer Aplikasi Sendiri dengan Inno Setup Compiler