Private Type PROCESS_INFORMATION hProcess As Long hThread As Long dwProcessId As Long dwThreadId As Long End TypePrivate Type STARTUPINFO cb As Long lpReserved As String lpDesktop As String lpTitle As String dwX As Long dwY As Long dwXSize As Long dwYSize As Long dwXCountChars As Long dwYCountChars As Long dwFillAttribute As Long dwFlags As Long wShowWindow As Integer cbReserved2 As Integer lpReserved2 As Byte hStdInput As Long hStdOutput As Long hStdError As Long End Type
Dim lp As PROCESS_INFORMATION Dim si As STARTUPINFO si.cb = Len(si) CreateProcess vbNullString, "command.exe", ByVal 0&, ByVal 0&, 0, 0, ByVal 0&, vbNullString, si, lp直接用Shell也行
hProcess As Long
hThread As Long
dwProcessId As Long
dwThreadId As Long
End TypePrivate Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Byte
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Dim lp As PROCESS_INFORMATION
Dim si As STARTUPINFO
si.cb = Len(si)
CreateProcess vbNullString, "command.exe", ByVal 0&, ByVal 0&, 0, 0, ByVal 0&, vbNullString, si, lp直接用Shell也行
还有你声明CreateProcess这个API了吗