ShellExecute |
VB聲明 |
|
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 |
|
說明 |
|
查找與指定文件關聯在一起的程序的文件名 |
|
返回值 |
|
Long,非零表示成功,零表示失敗。會設置GetLastError |
|
參數表 |
|
參數 |
類型及說明 |
hwnd |
Long,指定一個窗口的句柄,有時候,windows程序有必要在創(chuàng)建自己的主窗口前顯示一個消息框 |
lpOperation |
String,指定字串“open”來打開lpFlie文檔,或指定“Print”來打印它 |
lpFile |
String,想用關聯程序打印或打開一個程序名或文件名 |
lpParameters |
String,如lpszFlie是可執(zhí)行文件,則這個字串包含傳遞給執(zhí)行程序的參數 |
lpDirectory |
String,想使用的完整路徑 |
nShowCmd |
Long,定義了如何顯示啟動程序的常數值。參考ShowWindow函數的nCmdShow參數 |
Top |