| 发表于:2007-05-28 14:07:543楼 得分:0 |
从别人处学习到的: private declare function openprocess lib "kernel32 " (byval dwdesiredaccess as long, _ byval binherithandle as long, byval dwprocessid as long) as long private declare function getexitcodeprocess lib "kernel32 " (byval hprocess as long, _ lpexitcode as long) as long private const process_query_information = &h400 private const status_pending = &h103 processid = shell(app.path & "\a.exe ", vbnormalfocus) hprocess = openprocess(process_query_information, false, processid) do call getexitcodeprocess(hprocess, exitcode) doevents loop while exitcode = status_pending | | |
|