如何检测win98系统中是否有某个程序正在运行,有的关闭这个程序?(50分)

  • 主题发起人 johnnywong
  • 开始时间
J

johnnywong

Unregistered / Unconfirmed
GUEST, unregistred user!
如何检测win98系统中是否有某个程序(如 QQ.exe)正在运行,有的话关闭这个程序?

一定要在win98上能通过,我在网上找到的关闭程序的代码在win98上都不能用。
 
先findwindow找到窗口,再sendmessage hwnd,wm_close 发送关闭消息。
 
能具体一点么?
 
百度一下吧

findprocess

ternimateprocess
 
hwnd:=findwindow('类名','窗口名');
if hwnd then
postmessage(hwnd,wm_close,0,0);
 
顶部