Private Declare Function PathFindOnPath Lib "shlwapi.dll" Alias "PathFindOnPathA" _
(ByVal pszFile As String, pszOtherDirs As String) As Long
Private Sub Command1_Click()
Dim temp As String, pszOtherDirs As String, rc As Long
temp = Me.Text1.Text & String(256, Chr(0))
pszOtherDirs = Me.Text2.Text
rc = PathFindOnPath(temp, pszOtherDirs)
If rc Then
MsgBox temp, , "見つかりました"
End If
End Sub
Private Sub Form_Load()
Me.Label4.Caption = "+" & vbCrLf & "Windowsディレクトリ" & _
vbCrLf & "+" & vbCrLf & "Windows/Systemディレクトリ"
End Sub |