1个回答
2013-12-18
展开全部
Declare Function WinExec Lib "Kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As LongDeclare Function WaitForSingleObject Lib "Kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As LongDeclare Function OpenProcess Lib "Kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Global Const INFINITE = -1&Global Const SYNCHRONIZE = &H100000Global iTask As Long, Ret As Long, pHandle As Long Private Sub Command1_Click() Dim Ch As StringCh = "abc.exe" ‘ 应用程序文件名称iTask = Shell(TempCh, 0)pHandle = OpenProcess(SYNCHRONIZE, False, iTask)Ret = WaitForSingleObject(pHandle, INFINITE) End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询