?? shellwaitapi.bas
字號:
Attribute VB_Name = "ShellWaitApi"
Option Explicit
Private Declare Function ShellExecuteEx Lib "shell32.dll" (SEI As SHELLEXECUTEINFO) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hWnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
' Optional fields
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Public Sub ShellWait(FileName As String, WorkDir As String, strParameters As String)
Dim ShExecInfo As SHELLEXECUTEINFO
ShExecInfo.cbSize = Len(ShExecInfo)
ShExecInfo.fMask = &H40
ShExecInfo.hWnd = frmMain.hWnd
ShExecInfo.lpVerb = "open"
ShExecInfo.lpFile = FileName
ShExecInfo.lpParameters = strParameters
ShExecInfo.lpDirectory = WorkDir
ShExecInfo.nShow = 1
ShExecInfo.hInstApp = vbNull
Call ShellExecuteEx(ShExecInfo)
Call WaitForSingleObject(ShExecInfo.hProcess, &HFFFF)
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -