Api ShellExecute 函数

来源:互联网 发布:网站搭建软件 编辑:程序博客网 时间:2024/04/25 15:17
  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

  其中各个参数的意义如下表所示:

参数
意义
hwndLong,指定一个窗口的句柄,有时windows程序要在创建自己的主窗口前显示一个消息框
lpOperationString,指定字串“open”来打开lpFlie文档,或指定“Print”来打印它
lpFileString,想用关联程序打印或打开一个程序名或文件名
lpParametersString,如lpszFlie是可执行文件,则这个字串包含传递给执行程序的参数
lpDirectoryString,想使用的完整路径
nShowCmdLong,定义了如何显示启动程序的常数值