Private Sub cmdFindProgram_Click()
file_name = txtFileName.Text
pos = InStrRev(file_name, "\")
file_path = Left$(file_name, pos)
file_name = Mid$(file_name, pos + 1)
result = Space$(1024)
FindExecutable file_name, file_path, result
pos = InStr(result, Chr$(0))
result = Left$(result, pos - 1)
lblResult.Caption = result
End Sub
|