影子 答:
取得窗口标题,用 PostMessage 关闭窗口,PostMessage 用法看下面的文章。
ipzone 答:
Public Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long
exam:
p_handle=shell("abc.exe",1)
h_program=OpenProcess(0,flase,p_hamdle)
`h_program=0,正在运行
`h_program<>0,运行完毕
Public Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long
exam:
p_handle=shell("abc.exe",1)
h_program=OpenProcess(0,flase,p_hamdle)
`h_program=0,正在运行
`h_program<>0,运行完毕
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073