Shell 是用来执行外部的可执行文件
如果是一个文件,那要用ShellExecute来启动预设的程式来开启文件
'HINSTANCE ShellExecute(
' HWND hwnd, // handle to parent window
' LPCTSTR lpOperation, // pointer to string that specifies operation to perform
' LPCTSTR lpFile, // pointer to filename string
' LPTSTR lpParameters, // pointer to string that specifies executable-file parameters
' LPCTSTR lpDirectory, // pointer to string that specifies default directory
' INT nShowCmd // whether file is shown when opened
' );
例:.doc 是由word或wordpad来开启
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
Const SW_SHOW = 5
ret = ShellExecute(me.hWnd, "open" , "文件完整路径及名称","", "", SW_SHOW
|