文本框中的任何路径名文件自动运行打开起来!
操作系统window底行点击“开始”、“运行”、输入文件路径名确定就能打开文件!请问“运行”动用到window中的那个可执行程序?在VB6.0中写一句什么样语句能模拟达到同样的目的!同样的效果?即文本框中的任何路径名文件自动运行打开起来!!!
[解决办法]
shell "cmd /c regedit "
[解决办法]
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
'用默认的关联程序打开目标
Sub OpenFileByDefault(ByVal strFile As String,Optional ByVal lngWnd As Long)
ShellExecute lngWnd, "open ", strFile, vbNullString, vbNullString, 1
End Sub