ファイルのパス名を指定すると、それに関連付けられたアプリケーションのパスを取得します。
Private SubForm_Load()
DimstrFilePathAs String
DimstrExeFilePathAs String* 80
DimlngRetAs Long
strFilePath = App.Path & "\work.txt"
lngRet = FindExecutable(strFilePath, 0, strExeFilePath)
IflngRet < 32Then
Else
MsgBox strExeFilePath
End If
End Sub
'----------------------------------------------------------
'
'----------------------------------------------------------
Declare FunctionFindExecutableLib"shell32.dll"Alias"FindExecutableA" (ByVallpFileAs String,ByVallpDirectoryAs String,ByVallpResultAs String)As Long
DownLoad vbtips072.lzh 2KB (VB6.0)