Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
char = InStr[b]Rev[/b](Right(Thisfile, 5), ".")
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_SHOWMAXIMIZED = 3
Private Sub Command1_Click()
ListDir "C:\", "*.*"
End Sub
Private Sub ListDir(ThisPath As String, ThisPattern As String)
On Error GoTo 1
Dim Thisfile As String
Dim char As String
Dim arrFile() As String
If Right$(ThisPath, 1) <> "\" Then ThisPath = ThisPath + "\"
Thisfile = Dir$(ThisPath + ThisPattern, 0)
List1.Tag = FilePath
Do While Thisfile <> ""
On Error Resume Next
char = InStrRev(Right(Thisfile, 5), ".")
On Error GoTo 0
Select Case char
Case 1, 2, 3, 4
List1.AddItem Left(Thisfile, Len(Thisfile) - (5 - char + 1))
Case Else
List1.AddItem Thisfile
End Select
Thisfile = Dir$
Loop
Exit Sub
1 MsgBox "Drive not reading"
End Sub
Private Sub List1_Click()
Dim ExPath
ExPath = List1.Tag & arrFile(List1.ListIndex)
ShellExecute hwnd, "open", ExPath, vbNullString, vbNullString, SW_SHOWMAXIMIZED
End Sub